YOLOv6 icon indicating copy to clipboard operation
YOLOv6 copied to clipboard

help AttributeError: module 'tools.eval' has no attribute 'run'

Open yuanzhougege opened this issue 2 years ago • 2 comments

Training completed in 0.053 hours. Traceback (most recent call last): File "tools/train.py", line 114, in main(args) File "tools/train.py", line 104, in main trainer.train() File "/docker_code/yolov6/YOLOv6-main/yolov6/core/engine.py", line 81, in train self.train_in_loop() File "/docker_code/yolov6/YOLOv6-main/yolov6/core/engine.py", line 100, in train_in_loop self.eval_and_save() File "/docker_code/yolov6/YOLOv6-main/yolov6/core/engine.py", line 126, in eval_and_save self.eval_model() File "/docker_code/yolov6/YOLOv6-main/yolov6/core/engine.py", line 145, in eval_model results = eval.run(self.data_dict, AttributeError: module 'tools.eval' has no attribute 'run'

yuanzhougege avatar Jul 21 '22 02:07 yuanzhougege

Try doing this prior to your command:

export PYTHONPATH=$PYTHONPATH:/docker_code/yolov6/YOLOv6-main/

yurkovak avatar Jul 21 '22 07:07 yurkovak

Have you install YOLOX? try pip uninstall yolox, because YOLOX built a library with the name tools.

mtjhl avatar Jul 22 '22 06:07 mtjhl

You can open python terminal, run

from tools import run 

If error occurs, see which package does not have run, then pip uninstall the package. Currently, I know yolox and detectron2 will cause this problem.

mtjhl avatar Aug 19 '22 05:08 mtjhl

Have you install YOLOX? try pip uninstall yolox, because YOLOX built a library with the name tools.

I meet the same problem, because I have build YOLOX. If you use anaconda to manage your environment, you can also built a new virtual environment for implementing yolov6 to solve this issue.

lugengyou avatar May 10 '23 04:05 lugengyou