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

[feat] Add yolov9 detection configs (S, M, C) #598

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- Add instance number logging feature for detection task by `@hglee98` in [PR 577](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/577)
- Add Precision and Recall metric for detection task by `@hglee98` in [PR 579](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/579)
- Add YOLOv9 by `@hglee98` in [PR 585](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/585), [PR 586](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/586), [PR 592](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/592), [PR 593](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/593), [PR 595](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/595), [PR 589](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/589), [PR 590](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/590), [PR 597](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/597)
- Add YOLOv9 by `@hglee98` in [PR 585](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/585), [PR 586](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/586), [PR 592](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/592), [PR 593](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/593), [PR 595](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/595), [PR 589](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/589), [PR 590](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/590), [PR 597](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/597), [PR 598](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/598)

## Bug Fixes:

Expand Down
71 changes: 71 additions & 0 deletions config/model/yolo/yolov9_c-detection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
model:
task: detection
name: yolov9_c
checkpoint:
use_pretrained: false
load_head: false
path: ~
optimizer_path: ~
freeze_backbone: false
architecture:
full: ~ # auto
backbone:
name: gelan
params:
stem_out_channels: 64
stem_kernel_size: 3
stem_stride: 2
return_stage_idx: [1, 2, 3]
act_type: &act_type silu
stage_params:
# Conv2D: ['conv', out_channels, kernel_size, stride]
# ELAN: ['elan', out_channels, part_channels, use_identity]
# RepNCSPELAN: ['repncspelan', out_channels, part_channels, use_identity, depth]
# AConv: ['aconv', out_channels]
# ADown: ['adown', out_channels]
-
- ['conv', 128, 3, 2]
- ['repncspelan', 256, 128, false, 1]
-
- ['adown', 256]
- ['repncspelan', 512, 256, false, 1]
-
- ['adown', 512]
- ['repncspelan', 512, 512, false, 1]
-
- ['adown', 512]
- ['repncspelan', 512, 512, false, 1]
neck:
name: yolov9fpn
params:
repeat_num: 1
act_type: *act_type
use_aux_loss: &use_aux_loss false
bu_type: adown
spp_channels: 512
n4_channels: 512
p3_channels: 256
p3_to_p4_channels: 256
p4_channels: 512
p4_to_p5_channels: 512
p5_channels: 512
head:
name: yolo_detection_head
params:
version: v9
num_anchors: ~
use_group: true
reg_max: 16
act_type: *act_type
use_aux_loss: *use_aux_loss
postprocessor:
params:
# postprocessor - decode
score_thresh: 0.01
# postprocessor - nms
nms_thresh: 0.65
class_agnostic: false
losses:
- criterion: yolov9_loss
weight: ~
l1_activate_epoch: ~
71 changes: 71 additions & 0 deletions config/model/yolo/yolov9_m-detection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
model:
task: detection
name: yolov9_m
checkpoint:
use_pretrained: false
load_head: false
path: ~
optimizer_path: ~
freeze_backbone: false
architecture:
full: ~ # auto
backbone:
name: gelan
params:
stem_out_channels: 32
stem_kernel_size: 3
stem_stride: 2
return_stage_idx: [1, 2, 3]
act_type: &act_type silu
stage_params:
# Conv2D: ['conv', out_channels, kernel_size, stride]
# ELAN: ['elan', out_channels, part_channels, use_identity]
# RepNCSPELAN: ['repncspelan', out_channels, part_channels, use_identity, depth]
# AConv: ['aconv', out_channels]
# ADown: ['adown', out_channels]
-
- ['conv', 64, 3, 2]
- ['repncspelan', 128, 128, false, 1]
-
- ['aconv', 240]
- ['repncspelan', 240, 240, false, 1]
-
- ['aconv', 360]
- ['repncspelan', 360, 360, false, 1]
-
- ['aconv', 480]
- ['repncspelan', 480, 480, false, 1]
neck:
name: yolov9fpn
params:
repeat_num: 1
act_type: *act_type
use_aux_loss: &use_aux_loss false
bu_type: aconv
spp_channels: 480
n4_channels: 360
p3_channels: 240
p3_to_p4_channels: 184
p4_channels: 360
p4_to_p5_channels: 240
p5_channels: 480
head:
name: yolo_detection_head
params:
version: v9
num_anchors: ~
use_group: true
reg_max: 16
act_type: *act_type
use_aux_loss: *use_aux_loss
postprocessor:
params:
# postprocessor - decode
score_thresh: 0.01
# postprocessor - nms
nms_thresh: 0.65
class_agnostic: false
losses:
- criterion: yolov9_loss
weight: ~
l1_activate_epoch: ~
71 changes: 71 additions & 0 deletions config/model/yolo/yolov9_s-detection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
model:
task: detection
name: yolov9_s
checkpoint:
use_pretrained: false
load_head: false
path: ~
optimizer_path: ~
freeze_backbone: false
architecture:
full: ~ # auto
backbone:
name: gelan
params:
stem_out_channels: 32
stem_kernel_size: 3
stem_stride: 2
return_stage_idx: [1, 2, 3]
act_type: &act_type silu
stage_params:
# Conv2D: ['conv', out_channels, kernel_size, stride]
# ELAN: ['elan', out_channels, part_channels, use_identity]
# RepNCSPELAN: ['repncspelan', out_channels, part_channels, use_identity, depth]
# AConv: ['aconv', out_channels]
# ADown: ['adown', out_channels]
-
- ['conv', 64, 3, 2]
- ['elan', 64, 64, false]
-
- ['aconv', 128]
- ['repncspelan', 128, 128, false, 3]
-
- ['aconv', 192]
- ['repncspelan', 192, 192, false, 3]
-
- ['aconv', 256]
- ['repncspelan', 256, 256, false, 3]
neck:
name: yolov9fpn
params:
repeat_num: 3
act_type: *act_type
use_aux_loss: &use_aux_loss false
bu_type: aconv
spp_channels: 256
n4_channels: 192
p3_channels: 128
p3_to_p4_channels: 96
p4_channels: 192
p4_to_p5_channels: 128
p5_channels: 256
head:
name: yolo_detection_head
params:
version: v9
num_anchors: ~
use_group: true
reg_max: 16
act_type: *act_type
use_aux_loss: *use_aux_loss
postprocessor:
params:
# postprocessor - decode
score_thresh: 0.01
# postprocessor - nms
nms_thresh: 0.65
class_agnostic: false
losses:
- criterion: yolov9_loss
weight: ~
l1_activate_epoch: ~
Loading