Stack Exchange
I try to train model with Tensorflow, but I have many errors when I start train model
I am very new to Tensorflow. If anyone could help, I will be really appreciated it.
(tensorflow) C:\Tensorflow\workspace\training_demo>python model_main_tf2.py --model_dir=models/my_ssd_resnet50_v1_fpn --pipeline_config_path=models/my_ssd_resnet50_v1_fpn/pipeline.config
2021-12-16 12:15:09.775852: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
Traceback (most recent call last):
  File "C:\Tensorflow\workspace\training_demo\model_main_tf2.py", line 40, in <module>
    from object_detection import model_lib_v2
  File "C:\Tensorflow\models\research\object_detection\model_lib_v2.py", line 27, in <module>
    from object_detection import eval_util
  File "C:\Tensorflow\models\research\object_detection\eval_util.py", line 35, in <module>
    from object_detection.metrics import coco_evaluation
  File "C:\Tensorflow\models\research\object_detection\metrics\coco_evaluation.py", line 25, in <module>
    from object_detection.metrics import coco_tools
  File "C:\Tensorflow\models\research\object_detection\metrics\coco_tools.py", line 51, in <module>
    from pycocotools import coco
  File "C:\Tensorflow\models\research\pycocotools\coco.py", line 55, in <module>
    from . import mask as maskUtils
  File "C:\Tensorflow\models\research\pycocotools\mask.py", line 3, in <module>
    import pycocotools._mask as _mask
ModuleNotFoundError: No module named 'pycocotools._mask'



I use instructions from here:https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html
Thank you in advance!

The error here is on the import line  import pycocotools._mask as _mask . Do you have the specified module available?

@Kat Misik First install pycocotools and then import _mask as follows:
pip install pycocotools
import pycocotools._mask as _mask
