Add TIPC whole_train_whole_infer

own
Bobholamovic 2 years ago
parent 5a24513136
commit 0f06d5d1ce
  1. 4
      paddlers/tasks/change_detector.py
  2. 8
      test_tipc/configs/cd/bit/bit.yaml
  3. 2
      test_tipc/configs/cd/bit/bit_airchange.yaml
  4. 2
      test_tipc/configs/cd/bit/bit_levircd.yaml
  5. 2
      test_tipc/configs/cd/bit/train_infer_python.txt
  6. 8
      test_tipc/configs/cd/cdnet/cdnet_airchange.yaml
  7. 8
      test_tipc/configs/cd/cdnet/cdnet_levircd.yaml
  8. 53
      test_tipc/configs/cd/cdnet/train_infer_python.txt
  9. 2
      test_tipc/configs/cd/changeformer/changeformer_airchange.yaml
  10. 8
      test_tipc/configs/cd/changeformer/changeformer_levircd.yaml
  11. 10
      test_tipc/configs/cd/changeformer/train_infer_python.txt
  12. 8
      test_tipc/configs/cd/dsamnet/dsamnet_airchange.yaml
  13. 8
      test_tipc/configs/cd/dsamnet/dsamnet_levircd.yaml
  14. 53
      test_tipc/configs/cd/dsamnet/train_infer_python.txt
  15. 8
      test_tipc/configs/cd/dsifn/dsifn_airchange.yaml
  16. 8
      test_tipc/configs/cd/dsifn/dsifn_levircd.yaml
  17. 53
      test_tipc/configs/cd/dsifn/train_infer_python.txt
  18. 8
      test_tipc/configs/cd/fc_ef/fc_ef_airchange.yaml
  19. 8
      test_tipc/configs/cd/fc_ef/fc_ef_levircd.yaml
  20. 53
      test_tipc/configs/cd/fc_ef/train_infer_python.txt
  21. 8
      test_tipc/configs/cd/fc_siam_conc/fc_siam_conc_airchange.yaml
  22. 8
      test_tipc/configs/cd/fc_siam_conc/fc_siam_conc_levircd.yaml
  23. 53
      test_tipc/configs/cd/fc_siam_conc/train_infer_python.txt
  24. 8
      test_tipc/configs/cd/fc_siam_diff/fc_siam_diff_airchange.yaml
  25. 8
      test_tipc/configs/cd/fc_siam_diff/fc_siam_diff_levircd.yaml
  26. 53
      test_tipc/configs/cd/fc_siam_diff/train_infer_python.txt
  27. 8
      test_tipc/configs/cd/snunet/snunet_airchange.yaml
  28. 8
      test_tipc/configs/cd/snunet/snunet_levircd.yaml
  29. 53
      test_tipc/configs/cd/snunet/train_infer_python.txt
  30. 8
      test_tipc/configs/cd/stanet/stanet_airchange.yaml
  31. 8
      test_tipc/configs/cd/stanet/stanet_levircd.yaml
  32. 53
      test_tipc/configs/cd/stanet/train_infer_python.txt
  33. 2
      test_tipc/configs/clas/hrnet/hrnet_ucmerced.yaml
  34. 6
      test_tipc/configs/clas/hrnet/train_infer_python.txt
  35. 12
      test_tipc/infer.py
  36. 2
      test_tipc/prepare.sh
  37. 4
      tutorials/train/README.md

@ -52,9 +52,7 @@ class BaseChangeDetector(BaseModel):
if 'with_net' in self.init_params: if 'with_net' in self.init_params:
del self.init_params['with_net'] del self.init_params['with_net']
super(BaseChangeDetector, self).__init__('change_detector') super(BaseChangeDetector, self).__init__('change_detector')
if model_name not in __all__:
raise ValueError("ERROR: There is no model named {}.".format(
model_name))
self.model_name = model_name self.model_name = model_name
self.num_classes = num_classes self.num_classes = num_classes
self.use_mixed_loss = use_mixed_loss self.use_mixed_loss = use_mixed_loss

@ -1,8 +0,0 @@
# Basic configurations of BIT
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/bit/
model: !Node
type: BIT

@ -1,4 +1,4 @@
# Basic configurations of BIT with AirChange dataset # Configurations of BIT with AirChange dataset
_base_: ../_base_/airchange.yaml _base_: ../_base_/airchange.yaml

@ -1,4 +1,4 @@
# Basic configurations of BIT with LEVIR-CD dataset # Configurations of BIT with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml _base_: ../_base_/levircd.yaml

@ -6,7 +6,7 @@ use_gpu:null|null
--precision:null --precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10 --num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive --save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=4 --train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null --model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/bit/bit_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/bit/bit_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/bit/bit_levircd.yaml --config:lite_train_lite_infer=./test_tipc/configs/cd/bit/bit_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/bit/bit_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/bit/bit_levircd.yaml
train_model_name:best_model train_model_name:best_model

@ -0,0 +1,8 @@
# Configurations of CDNet with AirChange dataset
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/cdnet/
model: !Node
type: CDNet

@ -0,0 +1,8 @@
# Configurations of cdnet with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/cdnet/
model: !Node
type: CDNet

@ -0,0 +1,53 @@
===========================train_params===========================
model_name:cd:cdnet
python:python
gpu_list:0|0,1
use_gpu:null|null
--precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/cdnet/cdnet_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/cdnet/cdnet_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/cdnet/cdnet_levircd.yaml
train_model_name:best_model
null:null
##
trainer:norm
norm_train:test_tipc/run_task.py train cd
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:adaptive
--model_dir:adaptive
--fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:null
infer_export:null
infer_quant:False
inference:test_tipc/infer.py
--device:cpu|gpu
--enable_mkldnn:True
--cpu_threads:6
--batch_size:1
--use_trt:False
--precision:fp32
--model_dir:null
--config:null
--save_log_path:null
--benchmark:True
--model_name:cdnet
null:null

@ -1,4 +1,4 @@
# Basic configurations of ChangeFormer # Configurations of ChangeFormer with AirChange dataset
_base_: ../_base_/airchange.yaml _base_: ../_base_/airchange.yaml

@ -0,0 +1,8 @@
# Configurations of ChangeFormer with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/changeformer/
model: !Node
type: ChangeFormer

@ -6,14 +6,14 @@ use_gpu:null|null
--precision:null --precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10 --num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive --save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=4 --train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null --model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/changeformer/changeformer_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/changeformer/changeformer_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/changeformer/changeformer_levircd.yaml
train_model_name:best_model train_model_name:best_model
train_infer_file_list:./test_tipc/data/airchange/:./test_tipc/data/airchange/eval.txt
null:null null:null
## ##
trainer:norm trainer:norm
norm_train:test_tipc/run_task.py train cd --config ./test_tipc/configs/cd/changeformer/changeformer.yaml norm_train:test_tipc/run_task.py train cd
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
@ -27,7 +27,7 @@ null:null
===========================export_params=========================== ===========================export_params===========================
--save_dir:adaptive --save_dir:adaptive
--model_dir:adaptive --model_dir:adaptive
--fixed_input_shape:[1,3,256,256] --fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py norm_export:deploy/export/export_model.py
quant_export:null quant_export:null
fpgm_export:null fpgm_export:null
@ -46,7 +46,7 @@ inference:test_tipc/infer.py
--use_trt:False --use_trt:False
--precision:fp32 --precision:fp32
--model_dir:null --model_dir:null
--file_list:null:null --config:null
--save_log_path:null --save_log_path:null
--benchmark:True --benchmark:True
--model_name:changeformer --model_name:changeformer

@ -0,0 +1,8 @@
# Configurations of DSAMNet with AirChange dataset
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/dsamnet/
model: !Node
type: DSAMNet

@ -0,0 +1,8 @@
# Configurations of DSAMNet with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/dsamnet/
model: !Node
type: DSAMNet

@ -0,0 +1,53 @@
===========================train_params===========================
model_name:cd:dsamnet
python:python
gpu_list:0|0,1
use_gpu:null|null
--precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/dsamnet/dsamnet_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/dsamnet/dsamnet_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/dsamnet/dsamnet_levircd.yaml
train_model_name:best_model
null:null
##
trainer:norm
norm_train:test_tipc/run_task.py train cd
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:adaptive
--model_dir:adaptive
--fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:null
infer_export:null
infer_quant:False
inference:test_tipc/infer.py
--device:cpu|gpu
--enable_mkldnn:True
--cpu_threads:6
--batch_size:1
--use_trt:False
--precision:fp32
--model_dir:null
--config:null
--save_log_path:null
--benchmark:True
--model_name:dsamnet
null:null

@ -0,0 +1,8 @@
# Configurations of DSIFN with AirChange dataset
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/dsifn/
model: !Node
type: DSIFN

@ -0,0 +1,8 @@
# Configurations of DSIFN with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/dsifn/
model: !Node
type: DSIFN

@ -0,0 +1,53 @@
===========================train_params===========================
model_name:cd:dsifn
python:python
gpu_list:0|0,1
use_gpu:null|null
--precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/dsifn/dsifn_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/dsifn/dsifn_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/dsifn/dsifn_levircd.yaml
train_model_name:best_model
null:null
##
trainer:norm
norm_train:test_tipc/run_task.py train cd
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:adaptive
--model_dir:adaptive
--fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:null
infer_export:null
infer_quant:False
inference:test_tipc/infer.py
--device:cpu|gpu
--enable_mkldnn:True
--cpu_threads:6
--batch_size:1
--use_trt:False
--precision:fp32
--model_dir:null
--config:null
--save_log_path:null
--benchmark:True
--model_name:dsifn
null:null

@ -0,0 +1,8 @@
# Configurations of FC-EF with AirChange dataset
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/fc_ef/
model: !Node
type: FCEarlyFusion

@ -0,0 +1,8 @@
# Configurations of FC-EF with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/fc_ef/
model: !Node
type: FCEarlyFusion

@ -0,0 +1,53 @@
===========================train_params===========================
model_name:cd:fc_ef
python:python
gpu_list:0|0,1
use_gpu:null|null
--precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/fc_ef/fc_ef_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/fc_ef/fc_ef_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/fc_ef/fc_ef_levircd.yaml
train_model_name:best_model
null:null
##
trainer:norm
norm_train:test_tipc/run_task.py train cd
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:adaptive
--model_dir:adaptive
--fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:null
infer_export:null
infer_quant:False
inference:test_tipc/infer.py
--device:cpu|gpu
--enable_mkldnn:True
--cpu_threads:6
--batch_size:1
--use_trt:False
--precision:fp32
--model_dir:null
--config:null
--save_log_path:null
--benchmark:True
--model_name:fc_ef
null:null

@ -0,0 +1,8 @@
# Configurations of FC-Siam-conc with AirChange dataset
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/fc_siam_conc/
model: !Node
type: FCSiamConc

@ -0,0 +1,8 @@
# Configurations of FC-Siam-conc with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/fc_siam_conc/
model: !Node
type: FCSiamConc

@ -0,0 +1,53 @@
===========================train_params===========================
model_name:cd:fc_siam_conc
python:python
gpu_list:0|0,1
use_gpu:null|null
--precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/fc_siam_conc/fc_siam_conc_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/fc_siam_conc/fc_siam_conc_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/fc_siam_conc/fc_siam_conc_levircd.yaml
train_model_name:best_model
null:null
##
trainer:norm
norm_train:test_tipc/run_task.py train cd
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:adaptive
--model_dir:adaptive
--fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:null
infer_export:null
infer_quant:False
inference:test_tipc/infer.py
--device:cpu|gpu
--enable_mkldnn:True
--cpu_threads:6
--batch_size:1
--use_trt:False
--precision:fp32
--model_dir:null
--config:null
--save_log_path:null
--benchmark:True
--model_name:fc_siam_conc
null:null

@ -0,0 +1,8 @@
# Configurations of FC-Siam-diff with AirChange dataset
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/fc_siam_diff/
model: !Node
type: FCSiamDiff

@ -0,0 +1,8 @@
# Configurations of FC-Siam-diff with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/fc_siam_diff/
model: !Node
type: FCSiamDiff

@ -0,0 +1,53 @@
===========================train_params===========================
model_name:cd:fc_siam_diff
python:python
gpu_list:0|0,1
use_gpu:null|null
--precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/fc_siam_diff/fc_siam_diff_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/fc_siam_diff/fc_siam_diff_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/fc_siam_diff/fc_siam_diff_levircd.yaml
train_model_name:best_model
null:null
##
trainer:norm
norm_train:test_tipc/run_task.py train cd
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:adaptive
--model_dir:adaptive
--fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:null
infer_export:null
infer_quant:False
inference:test_tipc/infer.py
--device:cpu|gpu
--enable_mkldnn:True
--cpu_threads:6
--batch_size:1
--use_trt:False
--precision:fp32
--model_dir:null
--config:null
--save_log_path:null
--benchmark:True
--model_name:fc_siam_diff
null:null

@ -0,0 +1,8 @@
# Configurations of SNUNet with AirChange dataset
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/snunet/
model: !Node
type: SNUNet

@ -0,0 +1,8 @@
# Configurations of SNUNet with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/snunet/
model: !Node
type: SNUNet

@ -0,0 +1,53 @@
===========================train_params===========================
model_name:cd:snunet
python:python
gpu_list:0|0,1
use_gpu:null|null
--precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/snunet/snunet_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/snunet/snunet_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/snunet/snunet_levircd.yaml
train_model_name:best_model
null:null
##
trainer:norm
norm_train:test_tipc/run_task.py train cd
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:adaptive
--model_dir:adaptive
--fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:null
infer_export:null
infer_quant:False
inference:test_tipc/infer.py
--device:cpu|gpu
--enable_mkldnn:True
--cpu_threads:6
--batch_size:1
--use_trt:False
--precision:fp32
--model_dir:null
--config:null
--save_log_path:null
--benchmark:True
--model_name:snunet
null:null

@ -0,0 +1,8 @@
# Configurations of STANet with AirChange dataset
_base_: ../_base_/airchange.yaml
save_dir: ./test_tipc/output/cd/stanet/
model: !Node
type: STANet

@ -0,0 +1,8 @@
# Configurations of STANet with LEVIR-CD dataset
_base_: ../_base_/levircd.yaml
save_dir: ./test_tipc/output/cd/stanet/
model: !Node
type: STANet

@ -0,0 +1,53 @@
===========================train_params===========================
model_name:cd:stanet
python:python
gpu_list:0|0,1
use_gpu:null|null
--precision:null
--num_epochs:lite_train_lite_infer=5|lite_train_whole_infer=5|whole_train_whole_infer=10
--save_dir:adaptive
--train_batch_size:lite_train_lite_infer=4|lite_train_whole_infer=4|whole_train_whole_infer=8
--model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/cd/stanet/stanet_airchange.yaml|lite_train_whole_infer=./test_tipc/configs/cd/stanet/stanet_airchange.yaml|whole_train_whole_infer=./test_tipc/configs/cd/stanet/stanet_levircd.yaml
train_model_name:best_model
null:null
##
trainer:norm
norm_train:test_tipc/run_task.py train cd
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================export_params===========================
--save_dir:adaptive
--model_dir:adaptive
--fixed_input_shape:[-1,3,256,256]
norm_export:deploy/export/export_model.py
quant_export:null
fpgm_export:null
distill_export:null
export1:null
export2:null
===========================infer_params===========================
infer_model:null
infer_export:null
infer_quant:False
inference:test_tipc/infer.py
--device:cpu|gpu
--enable_mkldnn:True
--cpu_threads:6
--batch_size:1
--use_trt:False
--precision:fp32
--model_dir:null
--config:null
--save_log_path:null
--benchmark:True
--model_name:stanet
null:null

@ -1,4 +1,4 @@
# Basic configurations of HRNet # Configurations of HRNet with UCMerced dataset
_base_: ../_base_/ucmerced.yaml _base_: ../_base_/ucmerced.yaml

@ -8,12 +8,12 @@ use_gpu:null|null
--save_dir:adaptive --save_dir:adaptive
--train_batch_size:lite_train_lite_infer=16|lite_train_whole_infer=16|whole_train_whole_infer=16 --train_batch_size:lite_train_lite_infer=16|lite_train_whole_infer=16|whole_train_whole_infer=16
--model_path:null --model_path:null
--config:lite_train_lite_infer=./test_tipc/configs/clas/hrnet/hrnet_ucmerced.yaml|lite_train_whole_infer=./test_tipc/configs/clas/hrnet/hrnet_ucmerced.yaml|whole_train_whole_infer=./test_tipc/configs/clas/hrnet/hrnet_ucmerced.yaml
train_model_name:best_model train_model_name:best_model
train_infer_file_list:./test_tipc/data/ucmerced/:./test_tipc/data/ucmerced/val.txt
null:null null:null
## ##
trainer:norm trainer:norm
norm_train:test_tipc/run_task.py train clas --config ./test_tipc/configs/clas/hrnet/hrnet.yaml norm_train:test_tipc/run_task.py train clas
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
@ -46,7 +46,7 @@ inference:test_tipc/infer.py
--use_trt:False --use_trt:False
--precision:fp32 --precision:fp32
--model_dir:null --model_dir:null
--file_list:null:null --config:null
--save_log_path:null --save_log_path:null
--benchmark:True --benchmark:True
--model_name:hrnet --model_name:hrnet

@ -13,6 +13,8 @@ from paddle.inference import PrecisionType
from paddlers.tasks import load_model from paddlers.tasks import load_model
from paddlers.utils import logging from paddlers.utils import logging
from config_utils import parse_configs
class _bool(object): class _bool(object):
def __new__(cls, x): def __new__(cls, x):
@ -285,7 +287,8 @@ class TIPCPredictor(object):
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--file_list', type=str, nargs=2) parser.add_argument('--config', type=str)
parser.add_argument('--inherit_off', action='store_true')
parser.add_argument('--model_dir', type=str, default='./') parser.add_argument('--model_dir', type=str, default='./')
parser.add_argument( parser.add_argument(
'--device', type=str, choices=['cpu', 'gpu'], default='cpu') '--device', type=str, choices=['cpu', 'gpu'], default='cpu')
@ -300,6 +303,11 @@ if __name__ == '__main__':
args = parser.parse_args() args = parser.parse_args()
cfg = parse_configs(args.config, not args.inherit_off)
eval_dataset = cfg['datasets']['eval']
data_dir = eval_dataset.args['data_dir']
file_list = eval_dataset.args['file_list']
predictor = TIPCPredictor( predictor = TIPCPredictor(
args.model_dir, args.model_dir,
device=args.device, device=args.device,
@ -310,7 +318,7 @@ if __name__ == '__main__':
trt_precision_mode=args.precision, trt_precision_mode=args.precision,
benchmark=args.benchmark) benchmark=args.benchmark)
predictor.predict(args.file_list[0], args.file_list[1]) predictor.predict(data_dir, file_list)
if args.benchmark: if args.benchmark:
predictor.autolog.report() predictor.autolog.report()

@ -48,6 +48,8 @@ elif [[ ${MODE} == 'whole_train_whole_infer' ]]; then
--out_dataset_dir "${DATA_DIR}/levircd" \ --out_dataset_dir "${DATA_DIR}/levircd" \
--crop_size 256 \ --crop_size 256 \
--crop_stride 256 --crop_stride 256
elif [[ ${task_name} == 'clas' ]]; then
download_and_unzip_dataset "${DATA_DIR}" ucmerced https://paddlers.bj.bcebos.com/datasets/ucmerced.zip
fi fi
fi fi

@ -9,11 +9,11 @@
|change_detection/changeformer.py | 变化检测 | ChangeFormer | |change_detection/changeformer.py | 变化检测 | ChangeFormer |
|change_detection/dsamnet.py | 变化检测 | DSAMNet | |change_detection/dsamnet.py | 变化检测 | DSAMNet |
|change_detection/dsifn.py | 变化检测 | DSIFN | |change_detection/dsifn.py | 变化检测 | DSIFN |
|change_detection/snunet.py | 变化检测 | SNUNet |
|change_detection/stanet.py | 变化检测 | STANet |
|change_detection/fc_ef.py | 变化检测 | FC-EF | |change_detection/fc_ef.py | 变化检测 | FC-EF |
|change_detection/fc_siam_conc.py | 变化检测 | FC-Siam-conc | |change_detection/fc_siam_conc.py | 变化检测 | FC-Siam-conc |
|change_detection/fc_siam_diff.py | 变化检测 | FC-Siam-diff | |change_detection/fc_siam_diff.py | 变化检测 | FC-Siam-diff |
|change_detection/snunet.py | 变化检测 | SNUNet |
|change_detection/stanet.py | 变化检测 | STANet |
|classification/hrnet.py | 场景分类 | HRNet | |classification/hrnet.py | 场景分类 | HRNet |
|classification/mobilenetv3.py | 场景分类 | MobileNetV3 | |classification/mobilenetv3.py | 场景分类 | MobileNetV3 |
|classification/resnet50_vd.py | 场景分类 | ResNet50-vd | |classification/resnet50_vd.py | 场景分类 | ResNet50-vd |

Loading…
Cancel
Save