Skip to content

carat-jhcha/tta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detectron2 Object Detection with TTA

1. Build image and run docker container

docker-compose up --build -d && docker exec -it detectron2_header_1.0v bash.

2. Set TTA's Hyperparameters

In run.pyand tta.py file, you can change Hyperparameters of TTA.

2.1. no TTA

args.TTA must be False.

2.2. horizontal flip

Flip the image horizontally.
In run.py, Hyperparameter args.TTA must be True.
In tta.py, Hyperparameter _flip set to True.

2.3. multi scale

Resize the given size.
Number of input image for TTA are 10 => (9 images are resized, 1 image is original size)

In run.py, Hyperparameter args.TTA must be True.
In tta.py, Hyperparameter _multi_scale set by list.

2.4. contrast

In run.py, Hyperparameter args.TTA must be True.
In tta.py, Hyperparameter _contrast set to True.

Contrast intensity is uniformly sampled in (intensity_min, intensity_max).
- intensity < 1 will reduce contrast
- intensity = 1 will preserve the input image
- intensity > 1 will increase contrast

3. Just run code

After setting TTA parameters.
Run python run.py.

4. check the test AP in your terminal.

Or check a log which located in /home/src/model/log.txt.

5. Best Result(default setting)

flip = True
multi_scale = [400, 600, 800, 1000]
contrast = [ ]
baseline AP: 40.2161
best AP: 41.6996

About

Test Time Augmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published