Skip to content

Commit 998ad99

Browse files
committed
Format black
1 parent cf65829 commit 998ad99

30 files changed

+5568
-2605
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ runs/
22
*/__pycache__/
33
__pycache__
44
weights/
5-
traced_model.pt
5+
traced_model.pt
6+
.vscode/

data/coco.yaml

Lines changed: 86 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,94 @@
44
download: bash ./scripts/get_coco.sh
55

66
# train and val data as 1) directory: path/images/, 2) file: path/images.txt, or 3) list: [path1/images/, path2/images/]
7-
train: ./coco/train2017.txt # 118287 images
8-
val: ./coco/val2017.txt # 5000 images
9-
test: ./coco/test-dev2017.txt # 20288 of 40670 images, submit to https://competitions.codalab.org/competitions/20794
7+
train: ./coco/train2017.txt # 118287 images
8+
val: ./coco/val2017.txt # 5000 images
9+
test: ./coco/test-dev2017.txt # 20288 of 40670 images, submit to https://competitions.codalab.org/competitions/20794
1010

1111
# number of classes
1212
nc: 80
1313

1414
# class names
15-
names: [ 'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light',
16-
'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow',
17-
'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee',
18-
'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard',
19-
'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple',
20-
'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch',
21-
'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone',
22-
'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear',
23-
'hair drier', 'toothbrush' ]
15+
names:
16+
[
17+
"person",
18+
"bicycle",
19+
"car",
20+
"motorcycle",
21+
"airplane",
22+
"bus",
23+
"train",
24+
"truck",
25+
"boat",
26+
"traffic light",
27+
"fire hydrant",
28+
"stop sign",
29+
"parking meter",
30+
"bench",
31+
"bird",
32+
"cat",
33+
"dog",
34+
"horse",
35+
"sheep",
36+
"cow",
37+
"elephant",
38+
"bear",
39+
"zebra",
40+
"giraffe",
41+
"backpack",
42+
"umbrella",
43+
"handbag",
44+
"tie",
45+
"suitcase",
46+
"frisbee",
47+
"skis",
48+
"snowboard",
49+
"sports ball",
50+
"kite",
51+
"baseball bat",
52+
"baseball glove",
53+
"skateboard",
54+
"surfboard",
55+
"tennis racket",
56+
"bottle",
57+
"wine glass",
58+
"cup",
59+
"fork",
60+
"knife",
61+
"spoon",
62+
"bowl",
63+
"banana",
64+
"apple",
65+
"sandwich",
66+
"orange",
67+
"broccoli",
68+
"carrot",
69+
"hot dog",
70+
"pizza",
71+
"donut",
72+
"cake",
73+
"chair",
74+
"couch",
75+
"potted plant",
76+
"bed",
77+
"dining table",
78+
"toilet",
79+
"tv",
80+
"laptop",
81+
"mouse",
82+
"remote",
83+
"keyboard",
84+
"cell phone",
85+
"microwave",
86+
"oven",
87+
"toaster",
88+
"sink",
89+
"refrigerator",
90+
"book",
91+
"clock",
92+
"vase",
93+
"scissors",
94+
"teddy bear",
95+
"hair drier",
96+
"toothbrush",
97+
]

data/hyp.scratch.custom.yaml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
2-
lrf: 0.1 # final OneCycleLR learning rate (lr0 * lrf)
3-
momentum: 0.937 # SGD momentum/Adam beta1
4-
weight_decay: 0.0005 # optimizer weight decay 5e-4
5-
warmup_epochs: 3.0 # warmup epochs (fractions ok)
6-
warmup_momentum: 0.8 # warmup initial momentum
7-
warmup_bias_lr: 0.1 # warmup initial bias lr
8-
box: 0.05 # box loss gain
9-
cls: 0.3 # cls loss gain
10-
cls_pw: 1.0 # cls BCELoss positive_weight
11-
obj: 0.7 # obj loss gain (scale with pixels)
12-
obj_pw: 1.0 # obj BCELoss positive_weight
13-
iou_t: 0.20 # IoU training threshold
14-
anchor_t: 4.0 # anchor-multiple threshold
1+
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
2+
lrf: 0.1 # final OneCycleLR learning rate (lr0 * lrf)
3+
momentum: 0.937 # SGD momentum/Adam beta1
4+
weight_decay: 0.0005 # optimizer weight decay 5e-4
5+
warmup_epochs: 3.0 # warmup epochs (fractions ok)
6+
warmup_momentum: 0.8 # warmup initial momentum
7+
warmup_bias_lr: 0.1 # warmup initial bias lr
8+
box: 0.05 # box loss gain
9+
cls: 0.3 # cls loss gain
10+
cls_pw: 1.0 # cls BCELoss positive_weight
11+
obj: 0.7 # obj loss gain (scale with pixels)
12+
obj_pw: 1.0 # obj BCELoss positive_weight
13+
iou_t: 0.20 # IoU training threshold
14+
anchor_t: 4.0 # anchor-multiple threshold
1515
# anchors: 3 # anchors per output layer (0 to ignore)
16-
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
17-
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
18-
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
19-
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
20-
degrees: 0.0 # image rotation (+/- deg)
21-
translate: 0.2 # image translation (+/- fraction)
22-
scale: 0.5 # image scale (+/- gain)
23-
shear: 0.0 # image shear (+/- deg)
24-
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
25-
flipud: 0.0 # image flip up-down (probability)
26-
fliplr: 0.5 # image flip left-right (probability)
27-
mosaic: 1.0 # image mosaic (probability)
28-
mixup: 0.0 # image mixup (probability)
29-
copy_paste: 0.0 # image copy paste (probability)
30-
paste_in: 0.0 # image copy paste (probability), use 0 for faster training
31-
loss_ota: 1 # use ComputeLossOTA, use 0 for faster training
16+
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
17+
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
18+
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
19+
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
20+
degrees: 0.0 # image rotation (+/- deg)
21+
translate: 0.2 # image translation (+/- fraction)
22+
scale: 0.5 # image scale (+/- gain)
23+
shear: 0.0 # image shear (+/- deg)
24+
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
25+
flipud: 0.0 # image flip up-down (probability)
26+
fliplr: 0.5 # image flip left-right (probability)
27+
mosaic: 1.0 # image mosaic (probability)
28+
mixup: 0.0 # image mixup (probability)
29+
copy_paste: 0.0 # image copy paste (probability)
30+
paste_in: 0.0 # image copy paste (probability), use 0 for faster training
31+
loss_ota: 1 # use ComputeLossOTA, use 0 for faster training

data/hyp.scratch.p5.yaml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
2-
lrf: 0.1 # final OneCycleLR learning rate (lr0 * lrf)
3-
momentum: 0.937 # SGD momentum/Adam beta1
4-
weight_decay: 0.0005 # optimizer weight decay 5e-4
5-
warmup_epochs: 3.0 # warmup epochs (fractions ok)
6-
warmup_momentum: 0.8 # warmup initial momentum
7-
warmup_bias_lr: 0.1 # warmup initial bias lr
8-
box: 0.05 # box loss gain
9-
cls: 0.3 # cls loss gain
10-
cls_pw: 1.0 # cls BCELoss positive_weight
11-
obj: 0.7 # obj loss gain (scale with pixels)
12-
obj_pw: 1.0 # obj BCELoss positive_weight
13-
iou_t: 0.20 # IoU training threshold
14-
anchor_t: 4.0 # anchor-multiple threshold
1+
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
2+
lrf: 0.1 # final OneCycleLR learning rate (lr0 * lrf)
3+
momentum: 0.937 # SGD momentum/Adam beta1
4+
weight_decay: 0.0005 # optimizer weight decay 5e-4
5+
warmup_epochs: 3.0 # warmup epochs (fractions ok)
6+
warmup_momentum: 0.8 # warmup initial momentum
7+
warmup_bias_lr: 0.1 # warmup initial bias lr
8+
box: 0.05 # box loss gain
9+
cls: 0.3 # cls loss gain
10+
cls_pw: 1.0 # cls BCELoss positive_weight
11+
obj: 0.7 # obj loss gain (scale with pixels)
12+
obj_pw: 1.0 # obj BCELoss positive_weight
13+
iou_t: 0.20 # IoU training threshold
14+
anchor_t: 4.0 # anchor-multiple threshold
1515
# anchors: 3 # anchors per output layer (0 to ignore)
16-
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
17-
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
18-
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
19-
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
20-
degrees: 0.0 # image rotation (+/- deg)
21-
translate: 0.2 # image translation (+/- fraction)
22-
scale: 0.9 # image scale (+/- gain)
23-
shear: 0.0 # image shear (+/- deg)
24-
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
25-
flipud: 0.0 # image flip up-down (probability)
26-
fliplr: 0.5 # image flip left-right (probability)
27-
mosaic: 1.0 # image mosaic (probability)
28-
mixup: 0.15 # image mixup (probability)
29-
copy_paste: 0.0 # image copy paste (probability)
30-
paste_in: 0.15 # image copy paste (probability), use 0 for faster training
31-
loss_ota: 1 # use ComputeLossOTA, use 0 for faster training
16+
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
17+
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
18+
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
19+
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
20+
degrees: 0.0 # image rotation (+/- deg)
21+
translate: 0.2 # image translation (+/- fraction)
22+
scale: 0.9 # image scale (+/- gain)
23+
shear: 0.0 # image shear (+/- deg)
24+
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
25+
flipud: 0.0 # image flip up-down (probability)
26+
fliplr: 0.5 # image flip left-right (probability)
27+
mosaic: 1.0 # image mosaic (probability)
28+
mixup: 0.15 # image mixup (probability)
29+
copy_paste: 0.0 # image copy paste (probability)
30+
paste_in: 0.15 # image copy paste (probability), use 0 for faster training
31+
loss_ota: 1 # use ComputeLossOTA, use 0 for faster training

data/hyp.scratch.p6.yaml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
2-
lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf)
3-
momentum: 0.937 # SGD momentum/Adam beta1
4-
weight_decay: 0.0005 # optimizer weight decay 5e-4
5-
warmup_epochs: 3.0 # warmup epochs (fractions ok)
6-
warmup_momentum: 0.8 # warmup initial momentum
7-
warmup_bias_lr: 0.1 # warmup initial bias lr
8-
box: 0.05 # box loss gain
9-
cls: 0.3 # cls loss gain
10-
cls_pw: 1.0 # cls BCELoss positive_weight
11-
obj: 0.7 # obj loss gain (scale with pixels)
12-
obj_pw: 1.0 # obj BCELoss positive_weight
13-
iou_t: 0.20 # IoU training threshold
14-
anchor_t: 4.0 # anchor-multiple threshold
1+
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
2+
lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf)
3+
momentum: 0.937 # SGD momentum/Adam beta1
4+
weight_decay: 0.0005 # optimizer weight decay 5e-4
5+
warmup_epochs: 3.0 # warmup epochs (fractions ok)
6+
warmup_momentum: 0.8 # warmup initial momentum
7+
warmup_bias_lr: 0.1 # warmup initial bias lr
8+
box: 0.05 # box loss gain
9+
cls: 0.3 # cls loss gain
10+
cls_pw: 1.0 # cls BCELoss positive_weight
11+
obj: 0.7 # obj loss gain (scale with pixels)
12+
obj_pw: 1.0 # obj BCELoss positive_weight
13+
iou_t: 0.20 # IoU training threshold
14+
anchor_t: 4.0 # anchor-multiple threshold
1515
# anchors: 3 # anchors per output layer (0 to ignore)
16-
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
17-
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
18-
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
19-
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
20-
degrees: 0.0 # image rotation (+/- deg)
21-
translate: 0.2 # image translation (+/- fraction)
22-
scale: 0.9 # image scale (+/- gain)
23-
shear: 0.0 # image shear (+/- deg)
24-
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
25-
flipud: 0.0 # image flip up-down (probability)
26-
fliplr: 0.5 # image flip left-right (probability)
27-
mosaic: 1.0 # image mosaic (probability)
28-
mixup: 0.15 # image mixup (probability)
29-
copy_paste: 0.0 # image copy paste (probability)
30-
paste_in: 0.15 # image copy paste (probability), use 0 for faster training
31-
loss_ota: 1 # use ComputeLossOTA, use 0 for faster training
16+
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
17+
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
18+
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
19+
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
20+
degrees: 0.0 # image rotation (+/- deg)
21+
translate: 0.2 # image translation (+/- fraction)
22+
scale: 0.9 # image scale (+/- gain)
23+
shear: 0.0 # image shear (+/- deg)
24+
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
25+
flipud: 0.0 # image flip up-down (probability)
26+
fliplr: 0.5 # image flip left-right (probability)
27+
mosaic: 1.0 # image mosaic (probability)
28+
mixup: 0.15 # image mixup (probability)
29+
copy_paste: 0.0 # image copy paste (probability)
30+
paste_in: 0.15 # image copy paste (probability), use 0 for faster training
31+
loss_ota: 1 # use ComputeLossOTA, use 0 for faster training

data/hyp.scratch.tiny.yaml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
2-
lrf: 0.01 # final OneCycleLR learning rate (lr0 * lrf)
3-
momentum: 0.937 # SGD momentum/Adam beta1
4-
weight_decay: 0.0005 # optimizer weight decay 5e-4
5-
warmup_epochs: 3.0 # warmup epochs (fractions ok)
6-
warmup_momentum: 0.8 # warmup initial momentum
7-
warmup_bias_lr: 0.1 # warmup initial bias lr
8-
box: 0.05 # box loss gain
9-
cls: 0.5 # cls loss gain
10-
cls_pw: 1.0 # cls BCELoss positive_weight
11-
obj: 1.0 # obj loss gain (scale with pixels)
12-
obj_pw: 1.0 # obj BCELoss positive_weight
13-
iou_t: 0.20 # IoU training threshold
14-
anchor_t: 4.0 # anchor-multiple threshold
1+
lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
2+
lrf: 0.01 # final OneCycleLR learning rate (lr0 * lrf)
3+
momentum: 0.937 # SGD momentum/Adam beta1
4+
weight_decay: 0.0005 # optimizer weight decay 5e-4
5+
warmup_epochs: 3.0 # warmup epochs (fractions ok)
6+
warmup_momentum: 0.8 # warmup initial momentum
7+
warmup_bias_lr: 0.1 # warmup initial bias lr
8+
box: 0.05 # box loss gain
9+
cls: 0.5 # cls loss gain
10+
cls_pw: 1.0 # cls BCELoss positive_weight
11+
obj: 1.0 # obj loss gain (scale with pixels)
12+
obj_pw: 1.0 # obj BCELoss positive_weight
13+
iou_t: 0.20 # IoU training threshold
14+
anchor_t: 4.0 # anchor-multiple threshold
1515
# anchors: 3 # anchors per output layer (0 to ignore)
16-
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
17-
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
18-
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
19-
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
20-
degrees: 0.0 # image rotation (+/- deg)
21-
translate: 0.1 # image translation (+/- fraction)
22-
scale: 0.5 # image scale (+/- gain)
23-
shear: 0.0 # image shear (+/- deg)
24-
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
25-
flipud: 0.0 # image flip up-down (probability)
26-
fliplr: 0.5 # image flip left-right (probability)
27-
mosaic: 1.0 # image mosaic (probability)
28-
mixup: 0.05 # image mixup (probability)
29-
copy_paste: 0.0 # image copy paste (probability)
30-
paste_in: 0.05 # image copy paste (probability), use 0 for faster training
16+
fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
17+
hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
18+
hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
19+
hsv_v: 0.4 # image HSV-Value augmentation (fraction)
20+
degrees: 0.0 # image rotation (+/- deg)
21+
translate: 0.1 # image translation (+/- fraction)
22+
scale: 0.5 # image scale (+/- gain)
23+
shear: 0.0 # image shear (+/- deg)
24+
perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
25+
flipud: 0.0 # image flip up-down (probability)
26+
fliplr: 0.5 # image flip left-right (probability)
27+
mosaic: 1.0 # image mosaic (probability)
28+
mixup: 0.05 # image mixup (probability)
29+
copy_paste: 0.0 # image copy paste (probability)
30+
paste_in: 0.05 # image copy paste (probability), use 0 for faster training
3131
loss_ota: 1 # use ComputeLossOTA, use 0 for faster training

0 commit comments

Comments
 (0)