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 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] Building bounding box index.
INFO:tensorflow:286 images are missing bboxes.
I0312 01:04:05.184590 140534908258048] 286 images are missing bboxes.
Traceback (most recent call last):
File “/workspace/server/”, line 333, in
File “/usr/local/lib/python3.6/dist-packages/absl/”, line 299, in run
_run_main(main, args)
File “/usr/local/lib/python3.6/dist-packages/absl/”, line 250, in _run_main
File “/workspace/server/”, line 321, in main
File “/workspace/server/”, line 275, in _create_tf_record_from_coco_annotations
File “/workspace/server/”, line 230, in _load_caption_annotations
caption_annotations = json.load(fid)
File “/usr/lib/python3.6/json/”, line 296, in load
return loads(,
File “/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/lib/io/”, line 122, in read
File “/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/lib/io/”, 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 " " docker container and the converter can be find /workspace/examples/maskrcnn/

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.

Hi @mohsen.zardadi,

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

Thank you.