Search code examples
python-3.xtensorflowobject-detection

FATAL Flags parsing error: flag --output_directory=None: Flag --output_directory must have a value other than None


I am following these instructions: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html under the paragraph: Exporting a Trained Model. I give this command:

sudo python3 \exporter_main_v2.py --input_type image_tensor --pipeline_config_path \models\my_ssd_resnet50_v1_fpn\pipeline.config --trained_checkpoint_dir \models\my_ssd_resnet50_v1_fpn\ --output_directory \exported-models\my_model

and I get this response:

2022-07-30 12:59:43.826846: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-07-30 12:59:43.826949: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
FATAL Flags parsing error: flag --output_directory=None: Flag --output_directory must have a value other than None.
Pass --helpshort or --helpfull to see help on flags.

I am in the path:

~/Desktop/TensorFlow/workspace/training_demo

I have read this possible solution: Running export_inference_graph.py throws an attribute error but I haven't resulted in something that works... Has anyone any idea what should I do? (I am trying to extract the newly trained inference graph, in order to perform the object detection).


Solution

  • Ok, I found it in case someone has the same problem... it needs this command:

    sudo python3 exporter_main_v2.py --input_type image_tensor --pipeline_config_path models/my_ssd_resnet50_v1_fpn/pipeline.config --trained_checkpoint_dir models/my_ssd_resnet50_v1_fpn/ --output_directory exported-models/my_model