SGT icon indicating copy to clipboard operation
SGT copied to clipboard

_evaluate_predictions_on_coco( TypeError: _evaluate_predictions_on_coco() got an unexpected keyword argument 'use_fast_impl'

Open FearlessArmy opened this issue 2 years ago • 4 comments
trafficstars

After 5 epoch of training, an error occurs when the model is saved to test the effect.

python projects/SGT/train_net.py --config-file projects/SGT/configs/MOT17/sgt_dla34.yaml --data-dir /root/datasets --num-gpus 1 OUTPUT_DIR /root/sgt_output/mot17_val/dla34_mot17-CH

FearlessArmy avatar Jul 09 '23 13:07 FearlessArmy

Traceback (most recent call last): File "F:\dl\SGT-main\projects\SGT\train_net.py", line 68, in launch( File "c:\users\jxust\q\detectron2-main\detectron2\engine\launch.py", line 84, in launch main_func(*args) File "F:\dl\SGT-main\projects\SGT\train_net.py", line 63, in main return trainer.train() File "F:\dl\SGT-main\projects\EpochTrainer\epoch_trainer\default_epoch_trainer.py", line 198, in train self.train_epoch(start_iter, end_iter, epoch) File "F:\dl\SGT-main\projects\EpochTrainer\epoch_trainer\default_epoch_trainer.py", line 221, in train_epoch self.after_step() File "c:\users\jxust\q\detectron2-main\detectron2\engine\train_loop.py", line 190, in after_step h.after_step() File "F:\dl\SGT-main\projects\EpochTrainer\epoch_trainer\epoch_hooks.py", line 66, in after_step self._do_eval() File "F:\dl\SGT-main\projects\EpochTrainer\epoch_trainer\epoch_hooks.py", line 40, in _do_eval results = self._func() File "F:\dl\SGT-main\projects\EpochTrainer\epoch_trainer\default_epoch_trainer.py", line 154, in test_and_save_results self._last_eval_results = self.test(self.cfg, self.model) File "F:\dl\SGT-main\projects\SGT\sgt\trainer.py", line 138, in test results_i = inference_on_dataset(cfg, model, data_loader, evaluator) File "F:\dl\SGT-main\projects\SGT\sgt\evaluator.py", line 115, in inference_on_dataset results = evaluator.evaluate() File "F:\dl\SGT-main\projects\Datasets\MOT\evaluation\mot_evaluation.py", line 282, in evaluate return copy.deepcopy(self._eval_predictions(predictions)) File "F:\dl\SGT-main\projects\Datasets\MOT\evaluation\mot_evaluation.py", line 318, in _eval_predictions dict_summary.update(self.evaluate_detections_by_coco_api(predictions)) File "F:\dl\SGT-main\projects\Datasets\MOT\evaluation\mot_evaluation.py", line 382, in evaluate_detections_by_coco_api _evaluate_predictions_on_coco( TypeError: _evaluate_predictions_on_coco() got an unexpected keyword argument 'use_fast_impl'

FearlessArmy avatar Jul 11 '23 07:07 FearlessArmy

@HYUNJS

FearlessArmy avatar Jul 12 '23 03:07 FearlessArmy

It seems that you are using a different version of detectron2. Please install the detectron2 version stated in the dockerfile (read INSTALL.md of my repo). Otherwise, you should revise the code following the recent version of "_evaluate_predictions_on_coco" function. Please refer to the recent detectron2 using that function.

https://github.com/facebookresearch/detectron2/blob/main/detectron2/evaluation/coco_evaluation.py#L271

HYUNJS avatar Jul 14 '23 12:07 HYUNJS

@HYUNJS The version I installed for Detectron2 is 0.6 and CUDA is 11.4, but I'm using Windows, not Docker. If I need to modify a file, is it a judgment to remove self._use_fast_impl?

FearlessArmy avatar Jul 14 '23 12:07 FearlessArmy