Skip to content

Commit

Permalink
Merge pull request #462 from Nota-NetsPresso/v0.2.2-release
Browse files Browse the repository at this point in the history
Micro update: v0.2.2 release
  • Loading branch information
illian01 committed Jun 11, 2024
2 parents 3751061 + 996cf5d commit 6c4741e
Show file tree
Hide file tree
Showing 206 changed files with 5,071 additions and 410 deletions.
1,226 changes: 1,226 additions & 0 deletions ACKNOWLEDGEMENTS

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@ No changes to highlight.

No changes to highlight.

# v0.2.2

## New Features:

- Update Benchmarks & Checkpoints (docs) and weights files to fully usable by `@illian01` in [PR 446](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/446), [PR 447](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/447), [PR 456](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/456), [PR 461](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/461)
- Add TFLite runtime code example by `@illian01` in [PR 449](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/449)

## Bug Fixes:

- Fix best_epoch init error in TrainingSummary in case of training resume by `@illian01` in [PR 448](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/448)
- Fix segmentation metric logic bug by `@illian01` in [PR 455](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/455), [PR 460](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/460)

## Breaking Changes:

No changes to highlight.

## Other Changes:

- Refactoring: remove thop, replace MACs with FLOPs by `@illian01` in [PR 444](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/444)
- Add copyright for entire project by `@illian01` in [PR 451](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/451)
- Modify ImageSaver to receive various resolution at once `@illian01` in [PR 458](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/458)

# v0.2.1

## New Features:
Expand Down
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,11 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


------------------------------------------------------------------------------
SOFTWARE LICENSE ACKNOWLEDGEMETS:

This software utilizes several external components with separate copyright and license terms.
Please see the ACKNOWLEDGEMENTS file.
------------------------------------------------------------------------------
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ If you are interested in utilizing open datasets, you can use them by following

### Semantic segmentation

- [ADE20K](https://github.com/Nota-NetsPresso/netspresso-trainer/blob/dev/tools/open_dataset_tool/ade20k.py)
- [Cityscapes](https://github.com/Nota-NetsPresso/netspresso-trainer/blob/dev/tools/open_dataset_tool/cityscapes.py)
- [PascalVOC 2012](https://github.com/Nota-NetsPresso/netspresso-trainer/blob/dev/tools/open_dataset_tool/voc2012_seg.py)

### Object detection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ augmentation:
inference:
-
name: resize
size: 64
size: 640
interpolation: bilinear
max_size: ~
resize_criteria: long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
data:
name: voc2012
name: ade20k
task: segmentation
format: local
path:
root: ./data/voc2012_seg
root: ./data/ade20k
train:
image: images/train # directory for training images
label: labels/train # directory for training labels
valid:
image: images/valid # directory for valid images
label: labels/valid # directory for valid labels
test:
image: ~
label: ~
image: images/valid # directory for test images
label: labels/valid # directory for test images
pattern:
image: ~
label: ~
label_image_mode: L
id_mapping: id_mapping.json
#id_mapping: ['background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor']
20 changes: 20 additions & 0 deletions config/data/local/cityscapes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
data:
name: cityscapes
task: segmentation
format: local
path:
root: ./data/cityscapes
train:
image: images/train # directory for training images
label: labels/train # directory for training labels
valid:
image: images/valid # directory for valid images
label: labels/valid # directory for valid labels
test:
image: images/valid # directory for test images
label: labels/valid # directory for test images
pattern:
image: ~
label: ~
label_image_mode: L
id_mapping: id_mapping.json
28 changes: 3 additions & 25 deletions config/data/local/voc12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ data:
task: segmentation
format: local
path:
root: ./data/voc2012_seg # dataset root
root: ./data/voc2012_seg
train:
image: images/train # directory for training images
label: labels/train # directory for training labels
Expand All @@ -16,28 +16,6 @@ data:
pattern:
image: ~
label: ~
label_image_mode: RGB
label_image_mode: L
id_mapping: id_mapping.json
# (0, 0, 0): background
# (128, 0, 0): aeroplane
# (0, 128, 0): bicycle
# (128, 128, 0): bird
# (0, 0, 128): boat
# (128, 0, 128): bottle
# (0, 128, 128): bus
# (128, 128, 128): car
# (64, 0, 0): cat
# (192, 0, 0): chair
# (64, 128, 0): cow
# (192, 128, 0): diningtable
# (64, 0, 128): dog
# (192, 0, 128): horse
# (64, 128, 128): motorbike
# (192, 128, 128): person
# (0, 64, 0): pottedplant
# (128, 64, 0): sheep
# (0, 192, 0): sofa
# (128, 192, 0): train
# (0, 64, 128): tvmonitor
# (128, 64, 128): void
pallete: ~
#id_mapping: ['background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor']
42 changes: 42 additions & 0 deletions config/data/local/voc12_rgb_mask.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
data:
name: voc2012
task: segmentation
format: local
path:
root: ./data/voc2012_seg # dataset root
train:
image: images/train # directory for training images
label: labels/train # directory for training labels
valid:
image: images/valid # directory for valid images
label: labels/valid # directory for valid labels
test:
image: ~
label: ~
pattern:
image: ~
label: ~
label_image_mode: RGB
id_mapping: id_mapping.json
# (0, 0, 0): background
# (128, 0, 0): aeroplane
# (0, 128, 0): bicycle
# (128, 128, 0): bird
# (0, 0, 128): boat
# (128, 0, 128): bottle
# (0, 128, 128): bus
# (128, 128, 128): car
# (64, 0, 0): cat
# (192, 0, 0): chair
# (64, 128, 0): cow
# (192, 128, 0): diningtable
# (64, 0, 128): dog
# (192, 0, 128): horse
# (64, 128, 128): motorbike
# (192, 128, 128): person
# (0, 64, 0): pottedplant
# (128, 64, 0): sheep
# (0, 192, 0): sofa
# (128, 192, 0): train
# (0, 64, 128): tvmonitor
pallete: ~
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ model:
intermediate_channels: 256
classifier_dropout_prob: 0.
losses:
- criterion: cross_entropy
- criterion: seg_cross_entropy
weight: ~
ignore_index: 255
ignore_index: 255 # Default undefined class is 255
4 changes: 2 additions & 2 deletions config/model/mixnet/mixnet-l-segmentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ model:
intermediate_channels: 256
classifier_dropout_prob: 0.
losses:
- criterion: cross_entropy
- criterion: seg_cross_entropy
weight: ~
ignore_index: 255
ignore_index: 255 # Default undefined class is 255
4 changes: 2 additions & 2 deletions config/model/mixnet/mixnet-m-segmentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ model:
intermediate_channels: 256
classifier_dropout_prob: 0.
losses:
- criterion: cross_entropy
- criterion: seg_cross_entropy
weight: ~
ignore_index: 255
ignore_index: 255 # Default undefined class is 255
4 changes: 2 additions & 2 deletions config/model/mixnet/mixnet-s-segmentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ model:
intermediate_channels: 256
classifier_dropout_prob: 0.
losses:
- criterion: cross_entropy
- criterion: seg_cross_entropy
weight: ~
ignore_index: 255
ignore_index: 255 # Default undefined class is 255
59 changes: 59 additions & 0 deletions config/model/mobilenetv3/mobilenetv3-large-classification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
model:
task: classification
name: mobilenet_v3_large
checkpoint:
use_pretrained: True
load_head: False
path: ~
fx_model_path: ~
optimizer_path: ~
freeze_backbone: False
architecture:
full: ~ # auto
backbone:
name: mobilenetv3
params: ~
stage_params:
-
in_channels: [16, 16, 24]
kernel_sizes: [3, 3, 3]
expanded_channels: [16, 64, 72]
out_channels: [16, 24, 24]
use_se: [False, False, False]
act_type: ["relu", "relu", "relu"]
stride: [1, 2, 1]
-
in_channels: [24, 40, 40]
kernel_sizes: [5, 5, 5]
expanded_channels: [72, 120, 120]
out_channels: [40, 40, 40]
use_se: [True, True, True]
act_type: ["relu", "relu", "relu"]
stride: [2, 1, 1]
-
in_channels: [40, 80, 80, 80, 80, 112]
kernel_sizes: [3, 3, 3, 3, 3, 3]
expanded_channels: [240, 200, 184, 184, 480, 672]
out_channels: [80, 80, 80, 80, 112, 112]
use_se: [False, False, False, False, True, True]
act_type: ["hard_swish", "hard_swish", "hard_swish", "hard_swish", "hard_swish", "hard_swish"]
stride: [2, 1, 1, 1, 1, 1]
-
in_channels: [112, 160, 160]
kernel_sizes: [5, 5, 5]
expanded_channels: [672, 960, 960]
out_channels: [160, 160, 160]
use_se: [True, True, True]
act_type: ["hard_swish", "hard_swish", "hard_swish"]
stride: [2, 1, 1]
head:
name: fc
params:
num_layers: 2
intermediate_channels: 1280
act_type: hard_swish
dropout_prob: 0.
losses:
- criterion: cross_entropy
label_smoothing: 0.1
weight: ~
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ model:
head:
name: fc
params:
num_layers: 1
intermediate_channels: ~
act_type: ~
num_layers: 2
intermediate_channels: 1024
act_type: hard_swish
dropout_prob: 0.
losses:
- criterion: cross_entropy
Expand Down
4 changes: 2 additions & 2 deletions config/model/mobilenetv3/mobilenetv3-small-segmentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ model:
intermediate_channels: 256
classifier_dropout_prob: 0.
losses:
- criterion: cross_entropy
- criterion: seg_cross_entropy
weight: ~
ignore_index: 255
ignore_index: 255 # Default undefined class is 255
4 changes: 2 additions & 2 deletions config/model/resnet/resnet50-segmentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ model:
intermediate_channels: 256
classifier_dropout_prob: 0.
losses:
- criterion: cross_entropy
- criterion: seg_cross_entropy
weight: ~
ignore_index: 255
ignore_index: 255 # Default undefined class is 255
4 changes: 2 additions & 2 deletions config/model/segformer/segformer-b0-segmentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ model:
classifier_dropout_prob: 0.
resize_output: [512, 512]
losses:
- criterion: cross_entropy
- criterion: seg_cross_entropy
weight: ~
ignore_index: 255
ignore_index: 255 # Default undefined class is 255
37 changes: 37 additions & 0 deletions config/model/yolox/yolox-l-detection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
model:
task: detection
name: yolox_l
checkpoint:
use_pretrained: True
load_head: False
path: ~
fx_model_path: ~
optimizer_path: ~
freeze_backbone: False
architecture:
full: ~ # auto
backbone:
name: cspdarknet
params:
dep_mul: &dep_mul 1.0
wid_mul: 1.0
act_type: &act_type "silu"
stage_params: ~
neck:
name: yolopafpn
params:
dep_mul: *dep_mul
act_type: *act_type
head:
name: anchor_free_decoupled_head
params:
act_type: *act_type
# postprocessor - decode
score_thresh: 0.01
# postprocessor - nms
nms_thresh: 0.65
class_agnostic: False
losses:
- criterion: yolox_loss
weight: ~
l1_activate_epoch: 1
Loading

0 comments on commit 6c4741e

Please sign in to comment.