PaddlePaddle / PaddleSlim

PaddleSlim is an open-source library for deep model compression and architecture search.
https://paddleslim.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.56k stars 345 forks source link

rtdetr nms false #1869

Open desinerPol opened 6 months ago

desinerPol commented 6 months ago

指令:python run.py --config_path=./configs/rtdetr_hgnetv2_x_qat_dis.yaml --save_dir='./output/' --devices='gpu'

配置nms为False Global: reader_config: configs/rtdetr_reader.yml include_nms: False Evaluation: True model_dir: ./models/rtdetr_hgnetv2_6x_coco_no_post/ model_filename: model.pdmodel params_filename: model.pdiparams

量化报错

File "/home/weconai/sda1/PaddleSlim/example/auto_compression/detection/run.py", line 198, in main() File "/home/weconai/sda1/PaddleSlim/example/auto_compression/detection/run.py", line 188, in main ac.compress() File "/home/weconai/.conda/envs/ppslim/lib/python3.10/site-packages/paddleslim-2.6.0-py3.10.egg/paddleslim/auto_compression/compressor.py", line 586, in compress self.single_strategy_compress(strategy, config, strategy_idx, File "/home/weconai/.conda/envs/ppslim/lib/python3.10/site-packages/paddleslim-2.6.0-py3.10.egg/paddleslim/auto_compression/compressor.py", line 780, in single_strategy_compress test_program_info = self._start_train( File "/home/weconai/.conda/envs/ppslim/lib/python3.10/site-packages/paddleslim-2.6.0-py3.10.egg/paddleslim/auto_compression/compressor.py", line 827, in _start_train metric = self.eval_function( File "/home/weconai/sda1/PaddleSlim/example/auto_compression/detection/run.py", line 109, in eval_function assert "Not support arch={} now.".format(global_config['arch']) KeyError: 'arch'

wanghaoshuang commented 6 months ago

当前给出的示例是以 PPYOLOE 为例,仅支持PPYOLOE的后处理逻辑。 如果切换模型,需要该下边链接的代码,来添加 rtdetr 模型结构的后处理逻辑: https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/detection/run.py#L105-L107