Converting custom made coco json to tfrecords using TLT MaskRCNN usecase

I am trying to convert custom-made coco annotations including objects and masks to TFRecords by running create_coco_tf_record.py from “TLT MaskRCNN example usecase”, but it keeps asking for caption_annotation_file.
INFO:tensorflow:Building bounding box index.
I0312 01:04:05.183368 140534908258048 create_coco_tf_record.py:212] Building bounding box index.
INFO:tensorflow:286 images are missing bboxes.
I0312 01:04:05.184590 140534908258048 create_coco_tf_record.py:223] 286 images are missing bboxes.
Traceback (most recent call last):
File “/workspace/server/create_coco_tf_record.py”, line 333, in
app.run(main)
File “/usr/local/lib/python3.6/dist-packages/absl/app.py”, line 299, in run
_run_main(main, args)
File “/usr/local/lib/python3.6/dist-packages/absl/app.py”, line 250, in _run_main
sys.exit(main(argv))
File “/workspace/server/create_coco_tf_record.py”, line 321, in main
num_shards=256)
File “/workspace/server/create_coco_tf_record.py”, line 275, in _create_tf_record_from_coco_annotations
_load_caption_annotations(caption_annotations_file))
File “/workspace/server/create_coco_tf_record.py”, line 230, in _load_caption_annotations
caption_annotations = json.load(fid)
File “/usr/lib/python3.6/json/init.py”, line 296, in load
return loads(fp.read(),
File “/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/lib/io/file_io.py”, line 122, in read
self._preread_check()
File “/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/lib/io/file_io.py”, line 84, in _preread_check
compat.as_bytes(self.__name), 1024 * 512)
tensorflow.python.framework.errors_impl.NotFoundError: ; No such file or directory

Is there any way we convert coco annotations for just masks and not passing any caption using TLT.

I am using "nvcr.io/nvidia/tlt-streamanalytics:v2.0_py3 " docker container and the converter can be find /workspace/examples/maskrcnn/create_coco_tf_record.py

Hi,
Please refer to the installation steps from the below link if in case you are missing on anything

However suggested approach is to use TRT NGC containers to avoid any system dependency related issues.

In order to run python sample, make sure TRT python packages are installed while using NGC container.
/opt/tensorrt/python/python_setup.sh
Thanks!

Hi @mohsen.zardadi,

This issue doesn’t look like TRT related. Please post your query in TLT forum.

Thank you.