我的输入
python model_main_tf2.py --model_dir=modelsmy_ssd_mobilenet_v2_fpnlite --pipeline_config_path=modelsmy_ssd_mobilenet_v2_fpnlitepipeline.config
输出Traceback (most recent call last):
File "model_main_tf2.py", line 32, in <module>
from object_detection import model_lib_v2
File "D:UsersOzguranaconda3envstensorflowlibsite-packagesobject_detectionmodel_lib_v2.py", line 29, in <module>
from object_detection import eval_util
File "D:UsersOzguranaconda3envstensorflowlibsite-packagesobject_detectioneval_util.py", line 36, in <module>
from object_detection.metrics import lvis_evaluation
File "D:UsersOzguranaconda3envstensorflowlibsite-packagesobject_detectionmetricslvis_evaluation.py", line 23, in <module>
from lvis import results as lvis_results
File "D:UsersOzguranaconda3envstensorflowlibsite-packageslvis__init__.py", line 5, in <module>
from lvis.vis import LVISVis
File "D:UsersOzguranaconda3envstensorflowlibsite-packageslvisvis.py", line 1, in <module>
import cv2
File "D:UsersOzguranaconda3envstensorflowlibsite-packagescv2__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.
我尝试pip安装opencv-python和其他,我研究,但没有发现这个错误有20 gb的可用空间在计算机上我的参考https://github.com/armaanpriyadarshan/Training-a-Custom-TensorFlow-2.x-Object-Detector请帮助我。
我在使用自定义数据集的tensorflow对象检测API训练模型时遇到了同样的问题。开始时我很挣扎,但最后我做到了
conda update -c conda-forge --all
我不知道为什么,但它对我有效。