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

Update from dev branch: v0.0.9 release #214

Merged
merged 48 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
aec3bf8
Init OneStageDetectionPipeline
illian01 Oct 26, 2023
0be4e33
Init yolo head
illian01 Oct 26, 2023
ba88ae0
Init yolox loss
illian01 Oct 26, 2023
e56181f
Add postprocessing
illian01 Oct 27, 2023
4a5cd9a
Merge branch 'master' into dev
Oct 27, 2023
260b097
Add PAFPN
illian01 Oct 30, 2023
6dd0eb7
use cxcywh box format
illian01 Oct 30, 2023
b1509ac
Fix metric computing and postprocessor
illian01 Oct 30, 2023
df0056f
Fix meshgrid
illian01 Oct 30, 2023
1134d6a
Refactoring decode
illian01 Oct 30, 2023
aed209c
Revert metric computing, refactoring postprocess
illian01 Oct 30, 2023
a639041
Change rigid values
illian01 Oct 30, 2023
3223dcb
Fix loss module to do not overwrite out tensor
illian01 Oct 30, 2023
a03b384
#207 fix entry point
Oct 30, 2023
df95b14
#207 check multi-gpu training with entrypoint
Oct 30, 2023
6ce9b1a
#207 fix comment
Oct 30, 2023
b1d6b42
#207 paginate cli interface
Oct 30, 2023
17cccd7
Add get_metric_with_all_outputs in train phase
illian01 Oct 30, 2023
80b8596
Sepcify branch
illian01 Oct 30, 2023
6d98ebe
Update CHANGELOG.md
illian01 Oct 30, 2023
84f92c7
Minor refactoring
illian01 Oct 31, 2023
26c0f0a
Apply postprocessor on test step
illian01 Oct 31, 2023
2c5648c
Fix bbox flip computing
illian01 Oct 31, 2023
75436cc
Update CHANGELOG.md
illian01 Oct 31, 2023
33a46ef
Merge branch 'dev' of https://github.com/Nota-NetsPresso/netspresso-t…
illian01 Oct 31, 2023
b3e5250
Revert unnecessary else branch
illian01 Oct 31, 2023
77e7575
Add type-hint with Literal
illian01 Oct 31, 2023
ee7551e
Merge pull request #211 from Nota-NetsPresso/196-flip-augmentation-bo…
illian01 Oct 31, 2023
37f61f4
Merge pull request #210 from Nota-NetsPresso/209-train-metric-with-en…
illian01 Oct 31, 2023
1bdc443
Merge branch 'dev' of https://github.com/Nota-NetsPresso/netspresso-t…
illian01 Oct 31, 2023
9f9b1fd
Apply training metric
illian01 Oct 31, 2023
575afae
Ruff fix
illian01 Oct 31, 2023
d2bcf0f
Add yolox config
illian01 Oct 31, 2023
07a49fa
#207 update multi-gpu training interface
Oct 31, 2023
0f49f73
#207 fix example training script
Oct 31, 2023
931bd7e
#207 oops... uncomment basic command
Oct 31, 2023
c838463
Update CHANGELOG.md
illian01 Oct 31, 2023
b6a249d
#207 add inline yaml path interface
Oct 31, 2023
16620e2
#207 hotfix: missing import
Oct 31, 2023
65fb77e
#207 update default interface
Oct 31, 2023
4084e62
ruff fix
Oct 31, 2023
094e383
Merge remote-tracking branch 'public/186-add-yolox'
Oct 31, 2023
9a019ec
Merge pull request #212 from Nota-NetsPresso/186-add-yolox
illian01 Nov 1, 2023
e46552f
Merge branch 'dev' into 207-sprint-multi-gpu-cli
Nov 1, 2023
127c698
update changelog
Nov 1, 2023
314d040
Merge pull request #213 from Nota-NetsPresso/207-sprint-multi-gpu-cli
Nov 1, 2023
cf128a4
Update changelog and package version
illian01 Nov 1, 2023
281af97
Merge branch 'dev' of https://github.com/Nota-NetsPresso/netspresso-t…
illian01 Nov 1, 2023
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
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
# Upcoming Release

(The updated changelog in pre-release will be included in stable release, `v0.0.9`)
## New Features:

No changes to highlight.

## Bug Fixes:

No changes to highlight.

## Breaking Changes:

No changes to highlight.

## Other Changes:

No changes to highlight.

# v0.0.9

## New Features:

- Add CSPDarknet by `@illian01` in [PR 195](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/195)
- Add YOLOX model by `@illian01` in [PR 195](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/195), [PR 212](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/212)
- Fix Faster R-CNN detection head to compat with PyNP compressor by `@illian01` in [PR 184](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/184), [PR 194](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/194), [PR 204](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/204)
- Support multi-GPU training with `netspresso-train` entrypoint by `@deepkyu`, `@illian01` and `@Only-bottle` in [PR 213](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/213)

## Bug Fixes:

- Remove fx training flag in entry point by `@illian01` in [PR 188](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/188)
- Fix bounding box coordinates computing error on random flip augmentation by `@illian01` in [PR 211](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/211)

## Breaking Changes:

Expand All @@ -22,6 +40,7 @@
- Parameterize activation function of BasicBlock and Bottleneck by `@illian01` in [PR193](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/193)
- Modify MobileNetV3 to stage format and remove forward hook by `@illian01` in [PR 199](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/199)
- Substitute MACs counter with `fvcore` library to sync with NetsPresso by `@deepkyu` and `@Only-bottle` in [PR 202](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/202)
- Enable to compute metric with all training samples by `@illian01` in [PR 210](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/210)

# v0.0.8

Expand Down
17 changes: 17 additions & 0 deletions config/model/yolox/yolox-detection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
model:
task: detection
checkpoint: ./weights/yolox/yolox_s.pth
fx_model_checkpoint: ~
resume_optimizer_checkpoint: ~
freeze_backbone: False
architecture:
full: ~ # auto
backbone:
name: cspdarknet
dep_mul: 0.33
wid_mul: 0.5
head:
name: yolo_head
losses:
- criterion: yolox_loss
weight: ~
29 changes: 3 additions & 26 deletions scripts/example_train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,34 +107,11 @@ netspresso-train\
# Put the number of GPU(s) to use in training at `--nproc_per_node`
#### (END)

# python -m torch.distributed.launch\
# --nproc_per_node 4\
# train.py\
# --data config/data/chess.yaml\
# netspresso-train\
# --gpus 0,1,2,3\
# --data config/data/beans.yaml\
# --augmentation config/augmentation/classification.yaml\
# --model config/model/resnet/resnet50-classification.yaml\
# --training config/training/classification.yaml\
# --logging config/logging.yaml\
# --environment config/environment.yaml


# python -m torch.distributed.launch\
# --nproc_per_node 4\
# train.py\
# --data config/data/sidewalk-semantic.yaml\
# --augmentation config/augmentation/segmentation.yaml\
# --model config/model/pidnet/pidnet-s-segmentation.yaml\
# --training config/training/segmentation.yaml\
# --logging config/logging.yaml\
# --environment config/environment.yaml


# python -m torch.distributed.launch\
# --nproc_per_node 4\
# train.py\
# --data config/data/traffic-sign.yaml\
# --augmentation config/augmentation/detection.yaml\
# --model config/model/efficientformer/efficientformer-l1-detection.yaml\
# --training config/training/detection.yaml\
# --logging config/logging.yaml\
# --environment config/environment.yaml
11 changes: 0 additions & 11 deletions scripts/example_train_fx.sh

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
python_requires=">=3.8",
entry_points={
"console_scripts": [
"netspresso-train = netspresso_trainer.train:train_with_yaml",
"netspresso-train = netspresso_trainer.trainer_cli:train_cli",
],
},
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion src/netspresso_trainer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.9.b0
0.0.9
9 changes: 6 additions & 3 deletions src/netspresso_trainer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from pathlib import Path

from .cfg import TrainerConfig
from .trainer import export_config_as_yaml, parse_args_netspresso, set_arguments, train_with_config, train_with_yaml
from netspresso_trainer.cfg import TrainerConfig
from netspresso_trainer.trainer_cli import parse_args_netspresso, set_arguments, train_cli
from netspresso_trainer.trainer_inline import export_config_as_yaml, train_with_config, train_with_yaml

train = train_with_config
### Starting from v0.0.9, the default train function runs with yaml configuration
train = train_with_yaml
# train = train_with_config

version = (Path(__file__).parent / "VERSION").read_text().strip()

Expand Down
4 changes: 2 additions & 2 deletions src/netspresso_trainer/dataloaders/augmentation/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __call__(self, image, mask=None, bbox=None):
if mask is not None:
mask = F.hflip(mask)
if bbox is not None:
bbox[..., 0:4:2] = w - bbox[..., 0:4:2]
bbox[..., 2::-2] = w - bbox[..., 0:4:2]
return image, mask, bbox

def __repr__(self):
Expand All @@ -142,7 +142,7 @@ def __call__(self, image, mask=None, bbox=None):
if mask is not None:
mask = F.vflip(mask)
if bbox is not None:
bbox[..., 1:4:2] = h - bbox[..., 1:4:2]
bbox[..., 3::-2] = h - bbox[..., 1:4:2]
return image, mask, bbox

def __repr__(self):
Expand Down
3 changes: 2 additions & 1 deletion src/netspresso_trainer/losses/detection/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .fastrcnn import RoiHeadLoss, RPNLoss
from .fastrcnn import RoiHeadLoss, RPNLoss
from .yolox import YOLOXLoss
Loading