Detectnet_v2 COCO config error

• Hardware (L40s)
• Network Type (Detectnet_v2)
• TLT Version (5.3.0)
• How to reproduce the issue ?
Using the same settings as in the documentation results in an error.

coco_config {
  root_directory_path: "/workspace/tao-experiments/data/coco"
  image_dir_names: ["val2017", "train2017"]
  annotation_files: ["annotations/instances_val2017.json", "annotations/instances_train2017.json"]
  num_partitions: 2
  num_shards: [32, 256]
}
image_directory_path: "/workspace/tao-experiments/data/coco"

tao model detectnet_v2 dataset_convert -d [coco_config] -o tfrecord

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/detectnet_v2/scripts/dataset_convert.py", line 168, in <module>
    raise e
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/detectnet_v2/scripts/dataset_convert.py", line 137, in <module>
    main()
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/detectnet_v2/scripts/dataset_convert.py", line 129, in main
    merge_text_proto(f.read(), dataset_export_config)
  File "/usr/local/lib/python3.8/dist-packages/google/protobuf/text_format.py", line 719, in Merge
    return MergeLines(
  File "/usr/local/lib/python3.8/dist-packages/google/protobuf/text_format.py", line 793, in MergeLines
    return parser.MergeLines(lines, message)
  File "/usr/local/lib/python3.8/dist-packages/google/protobuf/text_format.py", line 818, in MergeLines
    self._ParseOrMerge(lines, message)
  File "/usr/local/lib/python3.8/dist-packages/google/protobuf/text_format.py", line 837, in _ParseOrMerge
    self._MergeField(tokenizer, message)
  File "/usr/local/lib/python3.8/dist-packages/google/protobuf/text_format.py", line 967, in _MergeField
    merger(tokenizer, message, field)
  File "/usr/local/lib/python3.8/dist-packages/google/protobuf/text_format.py", line 1042, in _MergeMessageField
    self._MergeField(tokenizer, sub_message)
  File "/usr/local/lib/python3.8/dist-packages/google/protobuf/text_format.py", line 932, in _MergeField
    raise tokenizer.ParseErrorPreviousToken(
google.protobuf.text_format.ParseError: 3:3 : Message type "COCOConfig" has no field named "image_dir_names".

Can you double check your txt file? Is it a typo? I think it should be image_dir_names.

Sorry, some text might have been moved while copying
I have reproduced the error and modified the issue content.

My txt file.
coco_config.txt (355 Bytes)

Based on the descriptor of the coco config, I modified it to img_dir_names, and it successfully executed the command.

coco_config {
  root_directory_path: "/workspace/tao-experiments/data/coco_data/coco2017"
  img_dir_names: ["val2017", "train2017"]
  annotation_files: ["annotations/instances_val2017.json", "annotations/instances_train2017.json"]
  num_partitions: 2
  num_shards: [32, 256] 
}
image_directory_path: "/workspace/tao-experiments/data/coco_data/coco2017"
2024-06-18 01:22:50,469 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.detectnet_v2.dataio.coco_converter_lib 254: Tfrecords generation complete.
2024-06-18 01:22:50,469 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.detectnet_v2.dataio.dataset_converter_lib 221: Writing the log_warning.json

Thanks for the info.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.