Skip to content
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

Demo.py #147

Open
wants to merge 228 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
fb3d318
add mlfow code
Oct 9, 2021
4d617bd
add
Oct 11, 2021
4480965
Merge branch 'main' of https://github.com/jinfagang/yolov7 into main
Oct 11, 2021
82db5e8
change mlflow
Oct 11, 2021
fbc0c82
newed a coco standard training script
Oct 11, 2021
e7449fb
fixed mlflow multiprocess problem
Oct 14, 2021
b97098f
add some exps on detr
Oct 15, 2021
dda13bd
add anchor detr code
Oct 15, 2021
8a91b03
anchor detr forward is OK
Oct 15, 2021
b26afe1
add
Oct 15, 2021
20f9e3f
add detr panoptic inference
Oct 20, 2021
34c2e0a
added anchordetr training
Oct 25, 2021
0f3a2f5
added anchordetr training
Oct 25, 2021
b117e1b
fix anchordetr save dir
Oct 26, 2021
9ce8404
modified mlflow install requirement in requirements.txt
Oct 26, 2021
493cbd4
add something
Oct 28, 2021
48433d6
fix anchordetr set_criterion num_classes error
Oct 29, 2021
f1a9a69
add
Nov 1, 2021
7508a9b
Merge branch 'main' of https://github.com/jinfagang/yolov7
Nov 1, 2021
3444e57
add smca
Nov 1, 2021
f8b2ab2
add anchordetr criterion
Nov 2, 2021
b64bef4
add anchordetr criterion
Nov 2, 2021
c9104c6
add anchordetr criterion
Nov 2, 2021
7eae225
add anchordetr criterion
Nov 2, 2021
856dd9c
add anchordetr criterion
Nov 2, 2021
1c44fb3
add anchordetr criterion
Nov 2, 2021
f0e246f
add anchordetr criterion
Nov 2, 2021
245e662
fix anchordetr huagianmather
Nov 2, 2021
dddaf7c
add
Nov 2, 2021
e33696b
loss_ce weight in anchordetr
Nov 2, 2021
049cff7
rm unused
Nov 2, 2021
448ebdd
add
Nov 3, 2021
16c456d
add
Nov 3, 2021
f1a312a
add
Nov 3, 2021
4de70aa
add smca
Nov 4, 2021
6ad3c2d
add smca
Nov 4, 2021
a837b2e
got this fucking error on SMCA
Nov 4, 2021
9ebb794
chagne name
Nov 4, 2021
5ac4d87
add a demo
Nov 8, 2021
9f73870
Merge branch 'main' of https://github.com/jinfagang/yolov7
Nov 8, 2021
b1eaffe
add clean data script
Nov 11, 2021
f66efbb
add
Nov 17, 2021
caafee3
add
Nov 17, 2021
ace2afc
now smca can reproduced
Nov 23, 2021
e1e0576
add speed benchmark
Nov 23, 2021
c7e2fa8
move solov2 head
Nov 23, 2021
204ace5
anchordetr lr reasonable
Nov 24, 2021
281b972
add
Nov 25, 2021
9bbce19
add d2go code
Nov 26, 2021
688434f
add
Nov 26, 2021
acc6f93
add d2go code
Nov 26, 2021
fd294fa
add worked anchordetr
Nov 29, 2021
46dcc72
add new config for tidal plate
Nov 29, 2021
34f9335
add
Nov 29, 2021
c9145c3
Merge branch 'runyuhe/add_tidal_plate_config' into 'main'
Nov 29, 2021
408254e
add
Nov 29, 2021
61a48b8
add
Nov 30, 2021
57f32b5
add custom class names in yaml
Nov 30, 2021
a87d382
add fbnets
Dec 1, 2021
206d4d1
update lr
Dec 1, 2021
0bd25f9
rm log
Feb 1, 2022
5eef8f5
update readme
Feb 1, 2022
257749f
add
Feb 1, 2022
bbaae4e
add
Feb 1, 2022
b388727
add
Feb 1, 2022
37e76dd
add
Feb 1, 2022
fdda57e
add
Feb 1, 2022
72f3126
add
Feb 1, 2022
6fc032a
add
Feb 4, 2022
fc48cdc
add
Feb 4, 2022
c34d855
update install docs
Feb 5, 2022
be1c1b3
change file mode
Laughing-q Feb 6, 2022
1c8aac5
Merge pull request #3 from Laughing-q/main
lucasjinreal Feb 6, 2022
079f7ed
Update readme.md
tomguluson92 Feb 7, 2022
6976c15
Merge pull request #5 from tomguluson92/main
lucasjinreal Feb 7, 2022
d0c5a03
add qrcode;
Feb 8, 2022
b6db21b
update darknet53 configb
Feb 28, 2022
0c8a53f
update images
Feb 28, 2022
64c78ac
update images
Feb 28, 2022
167a769
update contribute guidance
Feb 28, 2022
d72dc22
update deps
Mar 5, 2022
4354068
update deps
Mar 5, 2022
1fe70d1
add convnext task
Mar 7, 2022
6f04306
add dino
Mar 8, 2022
e4c8ce1
add dino
Mar 8, 2022
4826b00
release android version
Mar 14, 2022
170f328
add optional setup.py for outscope usage
Mar 25, 2022
e57187d
remove unsed imports
Mar 25, 2022
bf66b01
add unfinished sparseinst seg support (WIP)
Mar 25, 2022
00a528c
update readme
Mar 25, 2022
87b3f19
update readme
Mar 25, 2022
2845b10
add support of sparseinst
Mar 25, 2022
e423dd5
add support of sparseinst
Mar 25, 2022
4843210
sparseinst fully supported, also on CPU
Mar 25, 2022
b5cf96c
change default arch
Apr 8, 2022
0870bf1
add usage
Apr 8, 2022
4ada507
learn and add vidt+
Apr 8, 2022
7d685c3
add default neck type of darknet53
Apr 8, 2022
2db817b
add default neck for yolov7 arch
Apr 8, 2022
d10f507
support sparsinst export onnx
Apr 11, 2022
53a87df
take a deeper look on fx quantize
Apr 11, 2022
d795bca
int8 overall speed unreasonable slower
Apr 14, 2022
8df5f3c
adaptive_avg_pool2d need to solve for exporting onnx
Apr 14, 2022
5d5e23b
sparseinst support export onnx now.
Apr 15, 2022
3a2dede
sparseinst support export onnx now.
Apr 15, 2022
3f4e493
sparseinst support export onnx now.
Apr 15, 2022
c7fec7e
sparseinst confirmed work, fixed Nan value problems
Apr 15, 2022
aef3be4
model quantized unable to inference
Apr 16, 2022
8a50868
we cannot get concat work
Apr 17, 2022
1b238de
quantize can not get QlinearConcat work??!!!
Apr 17, 2022
2125661
we need force all opset to 13 for quantization work on onnxruntime
Apr 17, 2022
a152633
unable to quantize, strange result
Apr 17, 2022
401f8d8
add atom quant simplify
Apr 18, 2022
49da3a6
add workable version of r18
Apr 18, 2022
ec92945
add workable version of r18
Apr 18, 2022
411deb1
tensorrt work
Apr 18, 2022
fd33af4
tensorrt work
Apr 18, 2022
abc2832
this way is very hard to quantize, better stick with ort pqt quantize
Apr 19, 2022
585901a
it need pass fx proxy before quantize
Apr 19, 2022
652eb35
it need pass fx proxy before quantize
Apr 19, 2022
aad609b
fucking export all messed up
Apr 19, 2022
5884822
we need remove Mod Xor Not op inside onnx
Apr 21, 2022
9f04a0f
removed Mod
Apr 21, 2022
8d9bf9d
fix import error
Apr 21, 2022
ac41a26
we made it able to do it in batch when export onnx
Apr 22, 2022
5a8a29f
let ppq deal with resize
Apr 22, 2022
94ace5d
disable the recoring mask for current moment
Apr 22, 2022
54d3126
free a version
Apr 23, 2022
0c90dbd
update onnx
Apr 23, 2022
94f7df7
add nasvit
Apr 27, 2022
1d4d59e
add mobilevit
May 5, 2022
3ceb433
try fix mask issue
May 6, 2022
db3541b
fix the mask error
May 6, 2022
e002b88
sync with SparseInst official solution, without BitMask fix error
May 7, 2022
6514ba7
add damn it ppq
May 7, 2022
79dc74b
add yolox keypoints head!!
May 9, 2022
f9c0b72
update readme
May 9, 2022
00250d7
fix a sparseinst bug when max_detections less then 50.
acai66 May 10, 2022
38bae45
apply transforms to segmentation.
acai66 May 10, 2022
192c7bc
apply transforms to segmentation.
acai66 May 10, 2022
1a2fffa
Merge pull request #32 from acai66/temp
lucasjinreal May 10, 2022
c1a65cf
Merge pull request #31 from acai66/main
lucasjinreal May 10, 2022
5accf0f
fix solov2 and sparseinst training
May 10, 2022
d980aac
add DABDetr
May 18, 2022
b541d2e
adjust vis
May 20, 2022
4457fe1
fix yolox-kpts head
May 20, 2022
b3ce40c
simplifying demo, now using -i handles directory, img, video all
May 26, 2022
47b16a7
convnext backbone added
May 26, 2022
012c9b4
fix training of yolox-convnext
May 30, 2022
9a33180
yolov7 v1.0 released!
Jun 20, 2022
dc160fb
Add YOLOv6 efficientrep backbone && reppan neck
Jun 22, 2022
6d56484
Update encoder_sparseinst.py
LuoxiaofeiFly Jun 23, 2022
0ea7759
Merge pull request #60 from LuoxiaofeiFly/main
lucasjinreal Jun 23, 2022
1d6f56a
clean train scripts
Jun 25, 2022
3a39c65
fix yolov6 training support!!
Jun 25, 2022
28bf6a7
fix yolov6 training support!!
Jun 25, 2022
e0d854b
add
Jun 27, 2022
2f563a6
need to fix yolov6 head train
Jun 28, 2022
16ff34d
Readme grammatical error correction
k-keshav-k Jun 28, 2022
4bfb2b8
Merge pull request #62 from k-keshav-k/patch-1
lucasjinreal Jun 28, 2022
198fc9d
readme.md grammar changes
greyhawk16 Jul 1, 2022
db22bcd
Merge pull request #64 from greyhawk16/patch-1
lucasjinreal Jul 1, 2022
9b39415
GPU wanted!
Jul 1, 2022
6aa3fdc
clean train entrance && preparing release new version
Jul 3, 2022
5515cc6
add
Jul 3, 2022
3dbb35f
add overrides
Jul 4, 2022
29232fa
add overrides
Jul 4, 2022
c0a0bbc
Delete .DS_Store
bnutfilloyev Jul 4, 2022
9109ae8
ignored .DS_Store
bnutfilloyev Jul 4, 2022
5466d5f
Merge pull request #72 from YoshlikMedia/main
lucasjinreal Jul 4, 2022
7c05a67
update
Jul 5, 2022
2644b11
Merge branch 'main' of https://github.com/jinfagang/yolov7
Jul 5, 2022
4a2f902
feature: add wandb formatter and simple inference logger
parambharat Jul 6, 2022
d189695
feature: integrate wandb logger into the demo script
parambharat Jul 6, 2022
54c77f0
chore: remove log files from vcs
parambharat Jul 6, 2022
0f32923
fix: change label maps to match labels on wandb
parambharat Jul 6, 2022
249f238
feature: add wandb running args to readme
parambharat Jul 6, 2022
e31d9ad
fic: change error message to install wandb
parambharat Jul 7, 2022
896e3c8
fic: remove unset run_name parameter
parambharat Jul 7, 2022
8af6ad8
fix: add mask boxes, scores and number of objects
parambharat Jul 7, 2022
97f7800
fix: update wandb details in readme and black formatting
parambharat Jul 7, 2022
71f2f45
resolve changes in readme
parambharat Jul 7, 2022
7897ade
Merge pull request #1 from parambharat/wandb-inference-logging
parambharat Jul 7, 2022
f4a5e1b
chore: merge changes from upstream into fork
parambharat Jul 7, 2022
fa561ea
chore: merge changes from upstream into fork main
parambharat Jul 7, 2022
4175ed6
remove ds store file for upstream merge
parambharat Jul 7, 2022
76ac08e
Merge branch 'wandb-inference-logging'
parambharat Jul 7, 2022
56d0ded
add
Jul 7, 2022
3223830
add
Jul 7, 2022
11967ff
add
Jul 7, 2022
fc899e7
add
Jul 7, 2022
b3c34fc
fix: merge changes from upstream readme into fork
parambharat Jul 7, 2022
5e2c318
Merge branch 'wandb-inference-logging'
parambharat Jul 7, 2022
4f4dcac
Merge branch 'main' of https://github.com/jinfagang/yolov7
Jul 8, 2022
fbd8c75
add
Jul 8, 2022
0416b5e
Updated readme.md
asdf2kr Jul 8, 2022
949da3a
Merge pull request #82 from asdf2kr/develop
lucasjinreal Jul 8, 2022
60e5a6d
Merge branch 'main' into main
lucasjinreal Jul 8, 2022
2b45d75
Merge pull request #79 from parambharat/main
lucasjinreal Jul 8, 2022
68f745e
add wandadb support in demo
Jul 8, 2022
dd7baec
Update readme.md
lucasjinreal Jul 12, 2022
e93ef45
Update readme.md
asdf2kr Jul 12, 2022
391ec3a
yolov7 not found error correction
CSTEZCAN Jul 13, 2022
c6a8dc5
yolov7 not found error correction
CSTEZCAN Jul 13, 2022
689fb3c
yolov7 not found error correction
CSTEZCAN Jul 13, 2022
72017a2
yolov7 not found error correction
CSTEZCAN Jul 13, 2022
0a52702
yolov7 not found error correction
CSTEZCAN Jul 13, 2022
d83230a
yolov7 not found error correction
CSTEZCAN Jul 13, 2022
27ea091
yolov7 not found error correction
CSTEZCAN Jul 13, 2022
df0d6fa
Merge pull request #99 from CSTEZCAN/patch-8
lucasjinreal Jul 14, 2022
367f0e6
Merge pull request #97 from CSTEZCAN/patch-6
lucasjinreal Jul 14, 2022
025a271
Merge pull request #92 from CSTEZCAN/patch-1
lucasjinreal Jul 14, 2022
8c1729f
Merge pull request #93 from CSTEZCAN/patch-2
lucasjinreal Jul 14, 2022
1dfc43c
Merge pull request #94 from CSTEZCAN/patch-3
lucasjinreal Jul 14, 2022
f81243e
Merge pull request #95 from CSTEZCAN/patch-4
lucasjinreal Jul 14, 2022
cf1b6f8
Fixes #105
TeodorChiaburu Jul 17, 2022
856a463
Merge pull request #96 from CSTEZCAN/patch-5
lucasjinreal Jul 17, 2022
06e35e8
Merge pull request #107 from TeodorChiaburu/fix_mask_util
lucasjinreal Jul 17, 2022
db8f415
Closes #77
TeodorChiaburu Jul 18, 2022
49e1573
Merge pull request #111 from TeodorChiaburu/resolve_update_iter
lucasjinreal Jul 18, 2022
e1510be
update readme
Jul 18, 2022
0273e60
Resolves #113 - New COCOMaskEvaluator identical to the one used in Sp…
TeodorChiaburu Jul 19, 2022
7f84fae
Merge pull request #119 from TeodorChiaburu/resolve_pred_boxes
lucasjinreal Jul 20, 2022
95ee7e1
Update readme.md
asdf2kr Jul 20, 2022
1158c5d
Merge branch 'jinfagang:main' into develop
asdf2kr Jul 20, 2022
84a5ded
Merge pull request #89 from asdf2kr/develop
lucasjinreal Jul 20, 2022
b9953a7
Update readme.md
lucasjinreal Jul 26, 2022
84a3ad6
update keypoint result
Aug 1, 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
7 changes: 5 additions & 2 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,16 @@ dmypy.json
.pyre/

.idea/
weights/
*.pth
*.onnx

.vscode/
output/
datasets/
weights/
vendor/vendor/
vendor/
log2.md
vendor/
.DS_Store
wandb/
artifacts/
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

Empty file modified configs/Base-YOLOF.yaml
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion configs/Base-YOLOv7.yaml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MODEL:
META_ARCHITECTURE: "YOLO" # default is YOLO, can be YOLOV7, YOLOX, YOLOMASK as well
META_ARCHITECTURE: "YOLOV7" # default is YOLO, can be YOLOV7, YOLOX, YOLOMASK as well
PIXEL_MEAN: [0.406, 0.485, 0.456] # same value as PP-YOLOv2, BGR order
PIXEL_STD: [0.225, 0.229, 0.224]
PADDED_VALUE: 114.0
Expand Down
57 changes: 57 additions & 0 deletions configs/canaries/detrt_256_6_6_regnetx_0.4g.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
MODEL:
META_ARCHITECTURE: "Detr"
WEIGHTS: "detectron2://ImageNetPretrained/torchvision/R-50.pkl"
PIXEL_MEAN: [123.675, 116.280, 103.530]
PIXEL_STD: [58.395, 57.120, 57.375]
MASK_ON: False

BACKBONE:
NAME: "build_regnet_backbone"
REGNETS:
TYPE: "RegNetX_400MF"
OUT_FEATURES: ["s2", "s3", "s4"] # fpn produce 4 levels, only using 3 for now
# RESNETS:
# DEPTH: 50
# STRIDE_IN_1X1: False
# OUT_FEATURES: ["res2", "res3", "res4", "res5"]
DETR:
GIOU_WEIGHT: 2.0
L1_WEIGHT: 5.0
NUM_OBJECT_QUERIES: 100
ENC_LAYERS: 6
DEC_LAYERS: 6
HIDDEN_DIM: 256

DATASETS:
TRAIN: ("coco_2017_train",)
TEST: ("coco_2017_val",)

SOLVER:
IMS_PER_BATCH: 28
BASE_LR: 0.00005
STEPS: (369600,)
MAX_ITER: 554400
WARMUP_FACTOR: 1.0
WARMUP_ITERS: 10
WEIGHT_DECAY: 0.0001
OPTIMIZER: "ADAMW"
BACKBONE_MULTIPLIER: 0.1
CLIP_GRADIENTS:
ENABLED: True
CLIP_TYPE: "full_model"
CLIP_VALUE: 0.01
NORM_TYPE: 2.0
INPUT:
MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800)
CROP:
ENABLED: True
TYPE: "absolute_range"
SIZE: (384, 600)
FORMAT: "RGB"
TEST:
EVAL_PERIOD: 4000
DATALOADER:
FILTER_EMPTY_ANNOTATIONS: False
NUM_WORKERS: 2
VERSION: 2
OUTPUT_DIR: "output/coco_detr_regx"
Empty file modified configs/canaries/detrt_256_6_6_torchvision.yaml
100755 → 100644
Empty file.
Empty file modified configs/canaries/regnetx_0.2g.yaml
100755 → 100644
Empty file.
Empty file modified configs/canaries/yolomask_2gpu.yaml
100755 → 100644
Empty file.
Empty file modified configs/canaries/yolomask_m_8gpu.yaml
100755 → 100644
Empty file.
Empty file modified configs/coco-instance/solov2_lite.yaml
100755 → 100644
Empty file.
Empty file modified configs/coco-instance/yolomask.yaml
100755 → 100644
Empty file.
Empty file modified configs/coco-instance/yolomask_8gpu.yaml
100755 → 100644
Empty file.
85 changes: 85 additions & 0 deletions configs/coco-keypoints/yolox_kpts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
_BASE_: "../Base-YOLOv7.yaml"
MODEL:
PIXEL_MEAN: [0.485, 0.456, 0.406] # same value as PP-YOLOv2, RGB order
PIXEL_STD: [0.229, 0.224, 0.225]

WEIGHTS: ""
KEYPOINT_ON: True
META_ARCHITECTURE: "YOLOX"
BACKBONE:
NAME: "build_cspdarknetx_backbone"

DARKNET:
WEIGHTS: ""
DEPTH_WISE: False
OUT_FEATURES: ["dark3", "dark4", "dark5"]

YOLO:
CLASSES: 80
IN_FEATURES: ["dark3", "dark4", "dark5"]
CONF_THRESHOLD: 0.001
NMS_THRESHOLD: 0.65
IGNORE_THRESHOLD: 0.7
WIDTH_MUL: 0.50
DEPTH_MUL: 0.33
LOSS_TYPE: "v7"
LOSS:
LAMBDA_IOU: 1.5

DATASETS:
TRAIN: ("coco_2017_train",)
# TEST: ("coco_2014_val_mini",)
TEST: ("coco_2017_val",)

INPUT:
# FORMAT: "RGB" # using BGR default
MIN_SIZE_TRAIN: (416, 512, 608, 768)
MAX_SIZE_TRAIN: 800 # force max size train to 800?
MIN_SIZE_TEST: 640
MAX_SIZE_TEST: 800
# open all augmentations
JITTER_CROP:
ENABLED: False
RESIZE:
ENABLED: False
# SHAPE: (540, 960)
DISTORTION:
ENABLED: True
COLOR_JITTER:
BRIGHTNESS: True
SATURATION: True
# MOSAIC:
# ENABLED: True
# NUM_IMAGES: 4
# DEBUG_VIS: True
# # MOSAIC_WIDTH: 960
# # MOSAIC_HEIGHT: 540
MOSAIC_AND_MIXUP:
ENABLED: True
# ENABLED: False
DEBUG_VIS: False
ENABLE_MIXUP: False
DISABLE_AT_ITER: 120000


SOLVER:
# enable fp16 training
AMP:
ENABLED: true
IMS_PER_BATCH: 112
BASE_LR: 0.027
STEPS: (60000, 80000)
WARMUP_FACTOR: 0.00033333
WARMUP_ITERS: 1200
MAX_ITER: 230000
LR_SCHEDULER_NAME: "WarmupCosineLR"

TEST:
EVAL_PERIOD: 10000
# EVAL_PERIOD: 0
OUTPUT_DIR: "output/coco_yolox_s_kpts"
VIS_PERIOD: 5000

DATALOADER:
# proposals are part of the dataset_dicts, and take a lot of RAM
NUM_WORKERS: 3
Empty file modified configs/coco/cspdarknet53.yaml
100755 → 100644
Empty file.
5 changes: 4 additions & 1 deletion configs/coco/darknet53.yaml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_BASE_: "../Base-YoloV7.yaml"
_BASE_: "../Base-YOLOv7.yaml"
MODEL:
WEIGHTS: ""
MASK_ON: False
Expand All @@ -23,6 +23,9 @@ MODEL:
CONF_THRESHOLD: 0.2
NMS_THRESHOLD: 0.1
IGNORE_THRESHOLD: 0.6
NECK:
TYPE: "fpn"
WITH_SPP: True
DATASETS:
TRAIN: ("coco_2017_train",)
TEST: ("coco_2017_val",)
Expand Down
67 changes: 67 additions & 0 deletions configs/coco/detr/anchordetr_origin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
MODEL:
META_ARCHITECTURE: "AnchorDetr"
WEIGHTS: "detectron2://ImageNetPretrained/torchvision/R-50.pkl"
# WEIGHTS: "weights/R-50.pkl"
PIXEL_MEAN: [123.675, 116.280, 103.530]
PIXEL_STD: [58.395, 57.120, 57.375]
MASK_ON: False
RESNETS:
DEPTH: 50
STRIDE_IN_1X1: False
OUT_FEATURES: ["res2", "res3", "res4", "res5"]
DETR:
GIOU_WEIGHT: 2.0
L1_WEIGHT: 5.0
NUM_QUERY_POSITION: 300
DIM_FEEDFORWARD: 1024
DROPOUT: 0.0
ENC_LAYERS: 6
DEC_LAYERS: 6
HIDDEN_DIM: 256
NUM_CLASSES: 80
YOLO:
CONF_THRESHOLD: 0.001
IGNORE_THRESHOLD: 0.07

DATASETS:
TRAIN: ("coco_2017_train",)
TEST: ("coco_2017_val",)

SOLVER:
AMP:
ENABLED: true
IMS_PER_BATCH: 16
# BASE_LR: 0.0002 # 0.00025 is better
BASE_LR: 0.0001 # 0.00025 is better
STEPS: (295720, )
# MAX_ITER: 369650
MAX_ITER: 409650
WARMUP_FACTOR: 1.0
WARMUP_ITERS: 10
WEIGHT_DECAY: 0.0001
OPTIMIZER: "ADAMW"
LR_MULTIPLIER_OVERWRITE:
[{ "backbone": 0.1 }, { "reference_points": 0.1, "sampling_offsets": 0.1 }]
CLIP_GRADIENTS:
ENABLED: True
CLIP_TYPE: "full_model"
# CLIP_TYPE: "norm"
CLIP_VALUE: 0.1
NORM_TYPE: 2.0
INPUT:
MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800)
CROP:
ENABLED: True
TYPE: "absolute_range"
SIZE: (384, 600)
# SIZE: (384, 632)
FORMAT: "RGB"
TEST:
EVAL_PERIOD: 7393 # 1 epoch same as bs=2
DATALOADER:
FILTER_EMPTY_ANNOTATIONS: False
NUM_WORKERS: 2
VERSION: 2

VIS_PERIOD: 100
OUTPUT_DIR: "output/coco_anchordetr"
68 changes: 68 additions & 0 deletions configs/coco/detr/anchordetr_origin_bs64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
MODEL:
META_ARCHITECTURE: "AnchorDetr"
WEIGHTS: "detectron2://ImageNetPretrained/torchvision/R-50.pkl"
# WEIGHTS: "weights/R-50.pkl"
PIXEL_MEAN: [123.675, 116.280, 103.530]
PIXEL_STD: [58.395, 57.120, 57.375]
MASK_ON: False
RESNETS:
DEPTH: 50
STRIDE_IN_1X1: False
OUT_FEATURES: ["res2", "res3", "res4", "res5"]
DETR:
GIOU_WEIGHT: 2.0
L1_WEIGHT: 5.0
NUM_QUERY_POSITION: 300
DIM_FEEDFORWARD: 1024
DROPOUT: 0.0
ENC_LAYERS: 6
DEC_LAYERS: 6
HIDDEN_DIM: 256
NUM_CLASSES: 80
YOLO:
CONF_THRESHOLD: 0.001
IGNORE_THRESHOLD: 0.07

DATASETS:
TRAIN: ("coco_2017_train",)
TEST: ("coco_2017_val",)

SOLVER:
AMP:
ENABLED: true
IMS_PER_BATCH: 64
# BASE_LR: 0.0002 # 0.00025 is better
BASE_LR: 0.00025 # lr should be a little bit larger
# STEPS: (295720, )
STEPS: (73930, )
# MAX_ITER: 369650
MAX_ITER: 409650
WARMUP_FACTOR: 1.0
WARMUP_ITERS: 10
WEIGHT_DECAY: 0.0001
OPTIMIZER: "ADAMW"
LR_MULTIPLIER_OVERWRITE:
[{ "backbone": 0.1 }, { "reference_points": 0.1, "sampling_offsets": 0.1 }]
CLIP_GRADIENTS:
ENABLED: True
CLIP_TYPE: "full_model"
# CLIP_TYPE: "norm"
CLIP_VALUE: 0.1
NORM_TYPE: 2.0
INPUT:
MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800)
CROP:
ENABLED: True
TYPE: "absolute_range"
SIZE: (384, 600)
# SIZE: (384, 632)
FORMAT: "RGB"
TEST:
EVAL_PERIOD: 7393 # 1 epoch same as bs=2
DATALOADER:
FILTER_EMPTY_ANNOTATIONS: False
NUM_WORKERS: 2
VERSION: 2

VIS_PERIOD: 100
OUTPUT_DIR: "output/coco_anchordetr"
62 changes: 62 additions & 0 deletions configs/coco/detr/d2go/detr_bs16.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
MODEL:
META_ARCHITECTURE: "DetrD2go"
PIXEL_MEAN: [123.675, 116.280, 103.530]
PIXEL_STD: [58.395, 57.120, 57.375]
MASK_ON: False
RESNETS:
DEPTH: 50
STRIDE_IN_1X1: False
OUT_FEATURES: ["res2", "res3", "res4", "res5"]
DETR:
NUM_CLASSES: 80
CLS_WEIGHT: 2.0
DIM_FEEDFORWARD: 1024
GIOU_WEIGHT: 2.0
L1_WEIGHT: 5.0
NUM_OBJECT_QUERIES: 300
CENTERED_POSITION_ENCODIND: True
USE_FOCAL_LOSS: True
NUM_FEATURE_LEVELS: 1
ATTENTION_TYPE: 'DETR'

DATASETS:
TRAIN: ("coco_2017_train",)
TEST: ("coco_2017_val",)

SOLVER:
AMP:
ENABLED: true
IMS_PER_BATCH: 16
BASE_LR: 0.0001
STEPS: (887040,)
MAX_ITER: 1108800
WARMUP_FACTOR: 1.0
WARMUP_ITERS: 10
WEIGHT_DECAY: 0.0001
OPTIMIZER: "ADAMW"
CLIP_GRADIENTS:
ENABLED: True
CLIP_TYPE: "full_model"
CLIP_VALUE: 0.1
NORM_TYPE: 2.0
LR_MULTIPLIER_OVERWRITE: [{'backbone': 0.1}, {'reference_points': 0.1, 'sampling_offsets': 0.1}]
# BACKBONE_MULTIPLIER: 0.1

INPUT:
MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800)
CROP:
ENABLED: True
TYPE: "absolute_range"
SIZE: (384, 600)
FORMAT: "RGB"
# D2GO_DATA:
# MAPPER:
# NAME: "DETRDatasetMapper"

TEST:
EVAL_PERIOD: 4000
DATALOADER:
FILTER_EMPTY_ANNOTATIONS: False
NUM_WORKERS: 4
VERSION: 2

Loading