DLL load failed while importing cv2 Not enough memory resources are available to process this command

Viewed 1103

My Input

python model_main_tf2.py --model_dir=models\my_ssd_mobilenet_v2_fpnlite --pipeline_config_path=models\my_ssd_mobilenet_v2_fpnlite\pipeline.config

Output

Traceback (most recent call last):
  File "model_main_tf2.py", line 32, in <module>
    from object_detection import model_lib_v2
  File "D:\Users\Ozgur\anaconda3\envs\tensorflow\lib\site-packages\object_detection\model_lib_v2.py", line 29, in <module>
    from object_detection import eval_util
  File "D:\Users\Ozgur\anaconda3\envs\tensorflow\lib\site-packages\object_detection\eval_util.py", line 36, in <module>
    from object_detection.metrics import lvis_evaluation
  File "D:\Users\Ozgur\anaconda3\envs\tensorflow\lib\site-packages\object_detection\metrics\lvis_evaluation.py", line 23, in <module>
    from lvis import results as lvis_results
  File "D:\Users\Ozgur\anaconda3\envs\tensorflow\lib\site-packages\lvis\__init__.py", line 5, in <module>
    from lvis.vis import LVISVis
  File "D:\Users\Ozgur\anaconda3\envs\tensorflow\lib\site-packages\lvis\vis.py", line 1, in <module>
    import cv2
  File "D:\Users\Ozgur\anaconda3\envs\tensorflow\lib\site-packages\cv2\__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: DLL load failed while importing cv2: Not enough memory resources are available to process this command.

I try pip install opencv-python and other And I research but ı not found this error There is 20 gb of free space on the computer My reference https://github.com/armaanpriyadarshan/Training-a-Custom-TensorFlow-2.x-Object-Detector Please Help me.

1 Answers

I was having the same issue while training a model using tensorflow object detection API for custom dataset. I struggled a lot in starting but in end i did

conda update -c conda-forge --all

I don't know why but it worked for me.

Related