Skip to content

Yolox #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 99 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
8c1786c
decoder params
vishnubanna Oct 29, 2021
2e68bf1
decoder params
vishnubanna Oct 29, 2021
e0f852d
model-p5 train_path
vishnubanna Nov 1, 2021
018f975
model
vishnubanna Nov 4, 2021
73c186f
model
vishnubanna Nov 4, 2021
4d87447
model
vishnubanna Nov 4, 2021
db8580b
model
vishnubanna Nov 4, 2021
d74920c
model
vishnubanna Nov 4, 2021
74a52d7
yolox_head init
Nov 7, 2021
8d5c3bc
models
vishnubanna Nov 7, 2021
9669022
models
vishnubanna Nov 7, 2021
7f1e4b5
models
vishnubanna Nov 7, 2021
7c1add6
models
vishnubanna Nov 7, 2021
e27571b
models
vishnubanna Nov 7, 2021
a9ce08d
models
vishnubanna Nov 8, 2021
42c1cf6
Update DWConv in nn_blocks
Nov 9, 2021
40b7483
Update yolo_decoder.py
vishnubanna Nov 10, 2021
51b8f76
Merge branch 'yolox' of https://github.com/PurdueDualityLab/tf-models…
Nov 10, 2021
01b6930
yolox head init
Nov 11, 2021
5e4badd
Create yolox.py
Wenxin-Jiang Nov 11, 2021
813443e
Create yolox.py
Wenxin-Jiang Nov 11, 2021
ce48c86
yolox head update
Nov 14, 2021
2ac97f2
yolox head udpated
Nov 14, 2021
5050eab
yolox decoder update
Nov 15, 2021
8db0420
yolox head update
Nov 16, 2021
1d30b0d
Anchor.py copied from tensorflowmodels
Wenxin-Jiang Nov 19, 2021
ba9e168
Update yolox_head.py
patel996 Dec 1, 2021
761b61c
Update yolox.yaml
Wenxin-Jiang Dec 2, 2021
3418738
Update yolox.yaml
Wenxin-Jiang Dec 2, 2021
344fce6
Update yolox_head.py
patel996 Dec 3, 2021
233aea7
Update factory.py
patel996 Dec 5, 2021
303fb86
Update yolox.py
patel996 Dec 5, 2021
58234e8
Update yolox.yaml
patel996 Dec 5, 2021
7602a37
Update yolox.yaml
patel996 Dec 5, 2021
2bc6ceb
Update yolox_head.py
patel996 Dec 5, 2021
d97fdb7
Add some comments
patel996 Dec 5, 2021
828a855
Create yolox_head_test.py
patel996 Dec 6, 2021
f4aba5c
Update yolox_head_test.py
patel996 Dec 6, 2021
3ed5426
Add config methods
patel996 Dec 6, 2021
12b9021
Update Convs in yolox_head
Dec 6, 2021
701424d
yolo task updated
Dec 6, 2021
aeba188
Incremental Linting Commit
gfaout Dec 7, 2021
b71a0a3
Linting commit
gfaout Dec 7, 2021
787474f
Continued linting yolox_head branch
gfaout Dec 7, 2021
3ec5802
Merge branch 'yolox' of https://github.com/PurdueDualityLab/tf-models…
gfaout Dec 7, 2021
ffd2a84
Additional linting commit
gfaout Dec 7, 2021
3ba2d90
Update for any number of boxes
patel996 Dec 10, 2021
b37b181
Update yolox_head_test.py
patel996 Dec 10, 2021
172aa33
Ordering in format
patel996 Dec 10, 2021
2ba8122
Update args documentation
Wenxin-Jiang Dec 10, 2021
47e6fd5
Update yolox.yaml
Wenxin-Jiang Jan 12, 2022
09d19a8
training config
Jan 12, 2022
2031f5e
training config
Jan 12, 2022
408e5f7
remove loguru
Jan 12, 2022
3253b38
remove loguru
Jan 12, 2022
146375a
update yaml
Jan 12, 2022
29e6fb0
update yaml
Jan 12, 2022
df84c24
remove logger
Jan 12, 2022
15c8c01
Update training steps
Wenxin-Jiang Jan 16, 2022
550ee6f
set train_batch_size to 128
Wenxin-Jiang Jan 16, 2022
2ec3999
Update yolox.yaml
Wenxin-Jiang Jan 22, 2022
d48425e
Update yolox.py
patel996 Jan 22, 2022
683cd35
Update yolox.py
patel996 Jan 22, 2022
aebd5df
solve conflicts
Jan 24, 2022
9a53f00
solve conflicts
Jan 24, 2022
40fa116
Update yolox.yaml
Wenxin-Jiang Jan 24, 2022
d191638
solve conflicts
Jan 24, 2022
5bb6271
yolov4 test
Wenxin-Jiang Jan 24, 2022
62a9b68
solve conflicts
Jan 24, 2022
367003a
Merge branch 'yolox' of https://github.com/PurdueDualityLab/tf-models…
Jan 24, 2022
d75000d
solve conflicts
Jan 24, 2022
1d1585b
solve conflicts
Jan 24, 2022
842b27c
solve conflicts
Jan 24, 2022
ee9939a
solve conflicts
Jan 24, 2022
1519bf3
solve conflicts
Jan 24, 2022
69cf6c0
solve conflicts
Jan 24, 2022
e64372c
solve conflicts
Jan 24, 2022
985c344
Update yolov4_512_tpu.yaml
Wenxin-Jiang Jan 24, 2022
56d08e9
Update yolox_head.py
patel996 Jan 26, 2022
1d73722
Update yolox_head.py
patel996 Jan 26, 2022
b14404f
Update yolo.py
Wenxin-Jiang Jan 26, 2022
c9e3606
Update yolox.yaml
Wenxin-Jiang Jan 26, 2022
251d3af
Create yolox.yaml
Wenxin-Jiang Jan 26, 2022
09a0669
Update yolo.py
Wenxin-Jiang Jan 26, 2022
09f9961
Update loss
Wenxin-Jiang Jan 27, 2022
4bc3768
Update IOU normalizer
Wenxin-Jiang Jan 27, 2022
191e19f
Update yolo.py
Wenxin-Jiang Jan 27, 2022
5f0125b
Update loss in yolox.yaml
Wenxin-Jiang Jan 27, 2022
46c8947
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
60dd2c8
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
f889199
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
4ea7a29
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
eb4e60d
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
03c038f
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
220f33e
Create yolox.yaml
Wenxin-Jiang Jan 28, 2022
36b8a99
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
bfabace
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
ad0ff85
Update yolox.yaml
Wenxin-Jiang Jan 28, 2022
b4ae7e6
Update yolox_head.py
Wenxin-Jiang Jan 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
12 changes: 4 additions & 8 deletions official/vision/beta/projects/yolo/common/registry_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,16 @@
# pylint: disable=unused-import
# pylint: disable=g-bad-import-order
from official.common import registry_imports

# import configs
from official.vision.beta.projects.yolo.configs import darknet_classification
from official.vision.beta.projects.yolo.configs import yolo as yolo_config

# import modeling components
from official.vision.beta.projects.yolo.modeling.backbones import darknet
from official.vision.beta.projects.yolo.modeling.decoders import yolo_decoder

# import optimization packages
from official.vision.beta.projects.yolo.optimization import optimizer_factory
from official.vision.beta.projects.yolo.optimization.configs import (
optimization_config, optimizer_config)
# import tasks
from official.vision.beta.projects.yolo.tasks import image_classification
from official.vision.beta.projects.yolo.tasks import yolo as yolo_task

# import optimization packages
from official.vision.beta.projects.yolo.optimization import optimizer_factory
from official.vision.beta.projects.yolo.optimization.configs import optimizer_config
from official.vision.beta.projects.yolo.optimization.configs import optimization_config
1 change: 1 addition & 0 deletions official/vision/beta/projects/yolo/configs/backbones.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

"""Backbones configurations."""
import dataclasses

from official.modeling import hyperparams
from official.vision.beta.configs import backbones

Expand Down
3 changes: 3 additions & 0 deletions official/vision/beta/projects/yolo/configs/decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""Decoders configurations."""
import dataclasses
from typing import Optional

from official.modeling import hyperparams
from official.vision.beta.configs import decoders

Expand All @@ -33,6 +34,8 @@ class YoloDecoder(hyperparams.Config):
use_separable_conv: bool = False
csp_stack: Optional[bool] = None
fpn_depth: Optional[int] = None
max_fpn_depth: Optional[int] = None
max_csp_stack: Optional[int] = None
fpn_filter_scale: Optional[int] = None
path_process_len: Optional[int] = None
max_level_process_len: Optional[int] = None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# --experiment_type=scaled_yolo
# mAP 47.6
runtime:
distribution_strategy: 'tpu'
mixed_precision_dtype: 'float32'
tpu_enable_xla_dynamic_padder: false
task:
model:
input_size: [640, 640, 3]
backbone:
type: 'darknet'
darknet:
model_id: 'altered_cspdarknet53'
max_level: 5
min_level: 3
decoder:
type: yolo_decoder
yolo_decoder:
version: v4
type: csp
head:
smart_bias: true
detection_generator:
box_type:
'all': scaled
scale_xy:
'all': 2.0
max_boxes: 300
nms_type: iou
iou_thresh: 0.001
nms_thresh: 0.65
loss:
use_scaled_loss: true
update_on_repeat: true
box_loss_type:
'all': ciou
ignore_thresh:
'all': 0.0
iou_normalizer:
'all': 0.05
cls_normalizer:
'all': 0.3
object_normalizer:
'5': 0.28
'4': 0.70
'3': 2.80
objectness_smooth:
'all': 1.0
norm_activation:
use_sync_bn: true
num_classes: 80
anchor_boxes:
anchors_per_scale: 3
boxes: [box: [12, 16], box: [19, 36], box: [40, 28],
box: [36, 75], box: [76, 55], box: [72, 146],
box: [142, 110], box: [192, 243], box: [459, 401]]
train_data:
input_path: 'gs://cam2-datasets/coco/train*'
shuffle_buffer_size: 10000
parser:
mosaic:
mosaic_frequency: 1.0
mixup_frequency: 0.2
mosaic_crop_mode: 'scale'
mosaic_center: 0.25
aug_scale_min: 0.1
aug_scale_max: 1.9
max_num_instances: 300
letter_box: true
random_flip: true
aug_rand_translate: 0.1
area_thresh: 0.1
validation_data:
input_path: 'gs://cam2-datasets/coco/val*'
trainer:
train_steps: 831600 # epoch 300 to 450
optimizer_config:
learning_rate:
cosine:
decay_steps: 831600 # epoch 300 to 450
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# --experiment_type=large_yolo_finetune
# mAP 51.1%
runtime:
distribution_strategy: 'tpu'
mixed_precision_dtype: 'float32'
tpu_enable_xla_dynamic_padder: false
task:
model:
input_size: [896, 896, 3]
backbone:
type: 'darknet'
darknet:
model_id: 'csp-large'
max_level: 5
min_level: 3
width_scale: 1.00
depth_scale: 1.00
decoder:
type: yolo_decoder
yolo_decoder:
version: v4
type: csp_large
head:
smart_bias: true
detection_generator:
box_type:
'all': scaled
scale_xy:
'all': 2.0
max_boxes: 300
nms_type: iou
iou_thresh: 0.001
nms_thresh: 0.65
loss:
use_scaled_loss: true
update_on_repeat: true
box_loss_type:
'all': ciou
ignore_thresh:
'all': 0.0
iou_normalizer:
'all': 0.05
cls_normalizer:
'all': 0.5
object_normalizer:
'5': 0.4
'4': 1.0
'3': 4.0
objectness_smooth:
'all': 1.0
norm_activation:
use_sync_bn: true
num_classes: 80
anchor_boxes:
anchors_per_scale: 4
boxes: [box: [13,17], box: [31,25], box: [24,51], box: [61,45],
box: [48,102], box: [119,96], box: [97,189], box: [217,184],
box: [171,384], box: [324,451], box: [616,618], box: [800,800]]
train_data:
input_path: 'gs://cam2-datasets/coco/train*'
shuffle_buffer_size: 10000
parser:
mosaic:
mosaic_frequency: 1.0
mixup_frequency: 0.2
mosaic_crop_mode: 'scale'
mosaic_center: 0.0
aug_scale_min: 0.2
aug_scale_max: 1.8
max_num_instances: 300
letter_box: true
random_flip: true
aug_rand_translate: 0.5
area_thresh: 0.1
validation_data:
input_path: 'gs://cam2-datasets/coco/val*'
trainer:
train_steps: 831600 # epoch 300 to 450
optimizer_config:
learning_rate:
cosine:
decay_steps: 831600 # epoch 300 to 450
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# --experiment_type=large_yolo_finetune
# mAP 54.4%
runtime:
distribution_strategy: 'tpu'
mixed_precision_dtype: 'float32'
tpu_enable_xla_dynamic_padder: false
task:
model:
input_size: [1280, 1280, 3]
backbone:
type: 'darknet'
darknet:
model_id: 'csp-large'
max_level: 6
min_level: 3
width_scale: 1.00
depth_scale: 1.00
decoder:
type: yolo_decoder
yolo_decoder:
version: v4
type: csp_large
head:
smart_bias: true
detection_generator:
box_type:
'all': scaled
scale_xy:
'all': 2.0
max_boxes: 300
nms_type: iou
iou_thresh: 0.001
nms_thresh: 0.65
loss:
use_scaled_loss: true
update_on_repeat: true
box_loss_type:
'all': ciou
ignore_thresh:
'all': 0.0
iou_normalizer:
'all': 0.05
cls_normalizer:
'all': 0.5
object_normalizer:
'6': 0.1
'5': 0.4
'4': 1.0
'3': 4.0
objectness_smooth:
'all': 1.0
norm_activation:
use_sync_bn: true
num_classes: 80
anchor_boxes:
anchors_per_scale: 4
boxes: [box: [13,17], box: [31,25], box: [24,51], box: [61,45],
box: [61,45], box: [48,102], box: [119,96], box: [97,189],
box: [97,189], box: [217,184], box: [171,384], box: [324,451],
box: [324,451], box: [545,357], box: [616,618], box: [1024,1024]]
train_data:
input_path: '/readahead/200M/placer/prod/home/tensorflow-performance-data/datasets/coco/train*'
shuffle_buffer_size: 10000
parser:
mosaic:
mosaic_frequency: 1.0
mixup_frequency: 0.2
mosaic_crop_mode: 'scale'
mosaic_center: 0.0
aug_scale_min: 0.2
aug_scale_max: 1.8
max_num_instances: 300
letter_box: true
random_flip: true
aug_rand_translate: 0.5
area_thresh: 0.1
validation_data:
input_path: '/readahead/200M/placer/prod/home/tensorflow-performance-data/datasets/coco/val*'
trainer:
train_steps: 831600 # epoch 300 to 450
learning_rate:
cosine:
decay_steps: 831600 # epoch 300 to 450
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# --experiment_type=large_yolo
# mAP 55.3%
runtime:
distribution_strategy: 'tpu'
mixed_precision_dtype: 'float32'
tpu_enable_xla_dynamic_padder: false
task:
model:
input_size: [1536, 1536, 3]
backbone:
type: 'darknet'
darknet:
model_id: 'csp-large'
max_level: 7
min_level: 3
width_scale: 1.25
depth_scale: 1.00
decoder:
type: yolo_decoder
yolo_decoder:
version: v4
type: csp_large
head:
smart_bias: true
detection_generator:
box_type:
'all': scaled
scale_xy:
'all': 2.0
max_boxes: 300
nms_type: iou
iou_thresh: 0.001
nms_thresh: 0.65
loss:
use_scaled_loss: true
update_on_repeat: true
box_loss_type:
'all': ciou
ignore_thresh:
'all': 0.0
iou_normalizer:
'all': 0.05
cls_normalizer:
'all': 0.5
object_normalizer:
'7': 0.1
'6': 0.4
'5': 0.5
'4': 1.0
'3': 4.0
objectness_smooth:
'all': 1.0
norm_activation:
use_sync_bn: true
num_classes: 80
anchor_boxes:
anchors_per_scale: 4
boxes: [box: [13,17], box: [22,25], box: [55,41], box: [27,66],
box: [57,88], box: [112,69], box: [69,177], box: [136,138],
box: [136,138], box: [287,114], box: [134,275], box: [268,248],
box: [268,248], box: [232,504], box: [445,416], box: [640,640],
box: [812,393], box: [477,808], box: [1070,908], box: [1408,1408]]
train_data:
input_path: '/readahead/200M/placer/prod/home/tensorflow-performance-data/datasets/coco/train*'
shuffle_buffer_size: 10000
parser:
mosaic:
mosaic_frequency: 1.0
mixup_frequency: 0.2
mosaic_crop_mode: 'scale'
mosaic_center: 0.0
aug_scale_min: 0.2
aug_scale_max: 1.8
max_num_instances: 300
letter_box: true
random_flip: true
aug_rand_translate: 0.5
area_thresh: 0.1
validation_data:
input_path: '/readahead/200M/placer/prod/home/tensorflow-performance-data/datasets/coco/val*'
trainer:
train_steps: 831600 # epoch 300 to 450
learning_rate:
cosine:
decay_steps: 831600 # epoch 300 to 450
Loading