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

[TIPC] Support ENet #1769

Merged
merged 27 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions test_tipc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
| STDC | STDC_STDC1 | 支持 | - | - | - |
| MODNet | PP-Matting | 支持 | - | - | - |
| PFPNNet | PFPNNet | 支持 | - | - | - |
| ENet | ENet | 支持 | - | - | - |


## 3. 测试工具简介
Expand Down
34 changes: 34 additions & 0 deletions test_tipc/configs/enet/enet_cityscapes_1024x512_adam_0.002_80k.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
_base_: '../_base_/cityscapes.yml'
batch_size: 8

train_dataset:
transforms:
- type: RandomPaddingCrop
crop_size: [1024, 512]
- type: RandomDistort
brightness_range: 0.4
contrast_range: 0.4
saturation_range: 0.4
- type: Normalize
mode: train

model:
type: ENet
num_classes: 19
pretrained: Null

export:
transforms:
- type: Normalize

optimizer:
_inherited_: False
type: adam
weight_decay: 0.0002

lr_scheduler:
type: PolynomialDecay
end_lr: 0
learning_rate: 0.001
power: 0.9

52 changes: 52 additions & 0 deletions test_tipc/configs/enet/train_infer_python.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
===========================train_params===========================
model_name:enet
python:python3.7
gpu_list:0|0,1
Global.use_gpu:null|null
Global.auto_cast:null
--iters:lite_train_lite_infer=50|lite_train_whole_infer=50|whole_train_whole_infer=1000
--save_dir:
--batch_size:lite_train_lite_infer=2|lite_train_whole_infer=2|whole_train_whole_infer=3
Global.pretrained_model:null
train_model_name:best_model/model.pdparams
train_infer_img_dir:test_tipc/data/cityscapes/val.list
null:null
##
trainer:norm
norm_train:train.py --config test_tipc/configs/enet/enet_cityscapes_1024x512_adam_0.002_80k.yml --do_eval --save_interval 500 --seed 100
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:
--model_path:
norm_export:export.py --config test_tipc/configs/enet/enet_cityscapes_1024x512_adam_0.002_80k.yml --input_shape 1 3 1024 2048
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:./test_tipc/output/enet/model.pdparams
infer_export:export.py --config test_tipc/configs/enet/enet_cityscapes_1024x512_adam_0.002_80k.yml --input_shape 1 3 1024 2048
infer_quant:False
inference:deploy/python/infer.py --save_dir ./test_tipc/output/enet/
--device:cpu|gpu
--enable_mkldnn:True|False
--cpu_threads:1|6
--batch_size:1
--use_trt:False
--precision:fp32|int8|fp16
--config:
--image_path:./test_tipc/data/cityscapes/val.list
--save_log_path:null
--benchmark:True
--save_dir:
--model_name:enet
1 change: 1 addition & 0 deletions test_tipc/docs/test_train_inference_python.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Linux端基础训练预测功能测试的主程序为`test_train_inference_pytho
| STDC | STDC_STDC1 | 正常训练 | 正常训练 | | |
| MODNet | PP-Matting | 正常训练 | 正常训练 | | |
| PFPNNet | PFPNNet | 正常训练 | 正常训练 | | |
| ENet | ENet | 正常训练 | 正常训练 | | |


- 预测相关:基于训练是否使用量化,可以将训练产出的模型可以分为`正常模型`和`量化模型`,这两类模型对应的预测功能汇总如下,
Expand Down
2 changes: 1 addition & 1 deletion test_tipc/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [ ${model_name} == "fcn_hrnetw18_small" ] || [ ${model_name} == "pphumanseg_l
rm -rf ./test_tipc/data/mini_supervisely
wget -nc -P ./test_tipc/data/ https://paddleseg.bj.bcebos.com/humanseg/data/mini_supervisely.zip
cd ./test_tipc/data/ && unzip mini_supervisely.zip && cd -
elif [ ${model_name} == "ocrnet_hrnetw18" ] || [ ${model_name} == "bisenetv2" ] || [ ${model_name} == "segformer_b0" ] || [ ${model_name} == "stdc_stdc1" ] || [ ${model_name} == "pfpnnet" ];then
elif [ ${model_name} == "ocrnet_hrnetw18" ] || [ ${model_name} == "bisenetv2" ] || [ ${model_name} == "segformer_b0" ] || [ ${model_name} == "stdc_stdc1" ] || [ ${model_name} == "pfpnnet" ] || [ ${model_name} == "enet" ];then
rm -rf ./test_tipc/data/cityscapes
wget -nc -P ./test_tipc/data/ https://paddleseg.bj.bcebos.com/dataset/cityscapes.tar
cd ./test_tipc/data/ && tar -xvf cityscapes.tar && cd -
Expand Down