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

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

Open
FearlessArmy opened this issue Jul 9, 2023 · 4 comments

Comments

@FearlessArmy
Copy link

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
Copy link
Author

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
Copy link
Author

@HYUNJS

@HYUNJS
Copy link
Owner

HYUNJS commented Jul 14, 2023

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

@FearlessArmy
Copy link
Author

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants