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

ModuleNotFoundError: No module named 'yolox.layers.fast_cocoeval' #1346

Closed
kv55 opened this issue May 25, 2022 · 4 comments
Closed

ModuleNotFoundError: No module named 'yolox.layers.fast_cocoeval' #1346

kv55 opened this issue May 25, 2022 · 4 comments

Comments

@kv55
Copy link

kv55 commented May 25, 2022

While trying fast evaluation with the below command :
python -m yolox.tools.eval -n yolox-s -c yolox_s.pth -b 64 -d 8 --conf 0.001 [--fp16] [--fuse]
got the following error:

File "E:\yolo_inference\YOLOX\yolox\layers\jit_ops.py", line 83, in load
return importlib.import_module(self.absolute_name())
│ │ │ └ <function FastCOCOEvalOp.absolute_name at 0x00000155BB403040>
│ │ └ <yolox.layers.jit_ops.FastCOCOEvalOp object at 0x000001548F7069A0>
│ └ <function import_module at 0x00000154DC9053A0>
└ <module 'importlib' from 'C:\Users\****\Python39\lib\importlib\init.py'>

File "C:\Users****\Python39\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'yolox.layers.fast_cocoeval'
│ └ <function _gcd_import at 0x00000154DC6D13A0>
└ <module 'importlib._bootstrap' (frozen)>

File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 984, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'yolox.layers.fast_cocoeval'

ninja version: 1.10.2.3

@FateScript
Copy link
Member

What if you run the following code:

from yolox.layers import FastCOCOEvalOp
FastCOCOEvalOp().jit_load()

It will log

Load fast_cocoeval op in xx.xxx s.

@kv55
Copy link
Author

kv55 commented May 27, 2022

ModuleNotFoundError is solved, Thank you.
But, got the following error:

2022-05-27 16:07:45 | INFO | yolox.data.datasets.coco:64 - loading annotations into memory...
2022-05-27 16:07:46 | INFO | yolox.data.datasets.coco:64 - Done (t=0.65s)
2022-05-27 16:07:46 | INFO | pycocotools.coco:86 - creating index...
2022-05-27 16:07:46 | INFO | pycocotools.coco:86 - index created!
2022-05-27 16:07:48 | INFO | main:165 - loading checkpoint from weights\yolox_s.pth
0%| | 0/313 [00:00<?, ?it/s] | main:169 - loaded checkpoint done.
100%|####################################################################################################################################| 313/313 [01:00<00:00, 5.17it/s]
2022-05-27 16:08:50 | INFO | yolox.evaluators.coco_evaluator:235 - Evaluate in main process...
2022-05-27 16:09:06 | INFO | yolox.evaluators.coco_evaluator:268 - Loading and preparing results...
2022-05-27 16:09:10 | INFO | yolox.evaluators.coco_evaluator:268 - DONE (t=3.53s)
2022-05-27 16:09:10 | INFO | pycocotools.coco:366 - creating index...
2022-05-27 16:09:10 | INFO | pycocotools.coco:366 - index created!
Using C:\Users*\AppData\Local\torch_extensions\torch_extensions\Cache\py38_cu113 as PyTorch extensions root...
Emitting ninja build file C:\Users*
\AppData\Local\torch_extensions\torch_extensions\Cache\py38_cu113\fast_cocoeval\build.ninja...
Building extension module fast_cocoeval...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
2022-05-27 16:09:11 | ERROR | yolox.core.launch:--- Logging error in Loguru Handler #2 ---
98Record was: {'elapsed': datetime.timedelta(seconds=87, microseconds=884549), 'exception': (type=<class 'distutils.errors.DistutilsPlatformError'>, value=DistutilsPlatformError('Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/'), traceback=<traceback object at 0x0000026330E64780>), 'extra': {}, 'file': (name='launch.py', path='E:\OD_inference\YOLOX-main\yolox\core\launch.py'), 'function': 'launch', 'level': (name='ERROR', no=40, icon='❌'), 'line': 98, 'message': "An error has been caught in function 'launch', process 'MainProcess' (20336), thread 'MainThread' (14356):", 'module': 'launch', 'name': 'yolox.core.launch', 'process': (id=20336, name='MainProcess'), 'thread': (id=14356, name='MainThread'), 'time': datetime(2022, 5, 27, 16, 9, 11, 288993, tzinfo=datetime.timezone(datetime.timedelta(seconds=19800), 'India Standard Time'))}

  • An error has been caught in function 'launch', process 'MainProcess' (20336), thread 'MainThread' (14356):

@amansingh0330
Copy link

@kv55 how did you solved the ModuleNotFoundError: No module named 'yolox.layers.fast_cocoeval

Error

@kv55
Copy link
Author

kv55 commented May 30, 2022

modified fast_coco_eval_api.py as per the below link:
#1346 (comment)

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

3 participants