models icon indicating copy to clipboard operation
models copied to clipboard

model_main.py

Open mihuzz opened this issue 7 years ago • 4 comments

`I've gote problem when start training sdk) D:\Lesson8\models\research\object_detection>python model_main.py --logtostderr--train_dir=training/--pipeline_config_path=training/faster_rcnn_inception_v2_pets.config Traceback (most recent call last): File "model_main.py", line 26, in from object_detection import model_lib File "D:\Lesson8\models\research\object_detection\model_lib.py", line 27, in from object_detection import eval_util File "D:\Lesson8\models\research\object_detection\eval_util.py", line 28, in from object_detection.metrics import coco_evaluation File "D:\Lesson8\models\research\object_detection\metrics\coco_evaluation.py", line 20, in from object_detection.metrics import coco_tools File "D:\Lesson8\models\research\object_detection\metrics\coco_tools.py", line 47, in from pycocotools import coco File "D:\Lesson8\models\research\pycocotools\coco.py", line 55, in from . import mask as maskUtils File "D:\Lesson8\models\research\pycocotools\mask.py", line 3, in import pycocotools._mask as _mask ModuleNotFoundError: No module named 'pycocotools._mask'``

mihuzz avatar Jun 10 '19 20:06 mihuzz

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce

tensorflowbutler avatar Jun 11 '19 12:06 tensorflowbutler

Did you follow the steps of https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md ?

renanwille avatar Jun 12 '19 20:06 renanwille

I followed the object_detection/g3doc/installation.md step by step to install CocoAPI/PythonAPI.

For the CocoAPI installation,

  • First, I used make according to the installation.md, but it says ModuleNotFound Numpy. I indeed installed Numpy before.
  • Then, I tried tried python3 setup.py build_ext --inplace to Make under cocoapi/PythonAPI, and it doesn't show any errors.

OS: Ubuntu 18.04 LTS Python Version = 3.6.8 (System Default Version)

However, When I run the command line:

$ python object_detection/model_main.py --pipeline_config_path=pretrained/pipeline.config --model_dir=train --num_train_steps=1000 --sample_1_of_n_eval_examples=1 --alsologtostderr

It shows the error again.

Traceback (most recent call last):
  File "object_detection/model_main.py", line 26, in <module>
    from object_detection import model_lib
  File "/home/yantong/PycharmProjects/PedestrianDetection/object_detection/model_lib.py", line 28, in <module>
    from object_detection import eval_util
  File "/home/yantong/PycharmProjects/PedestrianDetection/object_detection/eval_util.py", line 28, in <module>
    from object_detection.metrics import coco_evaluation
  File "/home/yantong/PycharmProjects/PedestrianDetection/object_detection/metrics/coco_evaluation.py", line 20, in <module>
    from object_detection.metrics import coco_tools
  File "/home/yantong/PycharmProjects/PedestrianDetection/object_detection/metrics/coco_tools.py", line 47, in <module>
    from pycocotools import coco
  File "/home/yantong/PycharmProjects/PedestrianDetection/pycocotools/coco.py", line 55, in <module>
    from . import mask as maskUtils
  File "/home/yantong/PycharmProjects/PedestrianDetection/pycocotools/mask.py", line 3, in <module>
    import pycocotools._mask as _mask
ModuleNotFoundError: No module named 'pycocotools._mask'

Could somebody help me fix this issue? Thanks in advance.

######################################################################### Solution: https://stackoverflow.com/questions/56690223/ubuntu-18-04-lts-install-cocoapi

icmpnorequest avatar Jun 20 '19 18:06 icmpnorequest

Closing this issue since its resolved. Thanks!

ymodak avatar Jul 20 '19 20:07 ymodak