What should I prepare to train with custom data?

I want to learn the model with my custom data, but at this time I knew I needed a COCO data format. In coco_spec.json, there is a place where I write the path of the mask file. Now I just have my own image file, then do I have to make the mask images and annotation to train the bodyposenet model?

(I want to know which annotation(json) should be changed when learning the bodyposenet model by my custom data. The sample COCO dataset training was completed normaly.)

Please refer to Body Pose Estimation - NVIDIA Docs and Data Annotation Format - NVIDIA Docs

I just make my custom_data_keypoint.json through that reference but the error occurs when I generate segmentation masks and tfrecords from annotations in the bpnet.ipynb

The error occurs like

PermissionError: [Errno 13] Permission denied

I run this code.

!tao bpnet dataset_convert \
        -m 'train' \
        -o $DATA_DIR/train \
        --generate_masks \
        --dataset_spec $DATA_POSE_SPECS_DIR/custom_spec.json

Please note that all the path in your custom_spec.json should be an active path in the container. It is defined in ~/.tao_mounts.json.

I think my path in custom_spec.json is defined in ~/.tao_mounts.json because I just change the file_name like this.
(changed images_root_dir_path, mask_root_dir_path, and annotation_root_dir_path)
스크린샷, 2023-02-03 15-14-54

This is my tao_mounts.json

I rechecked the coco.json(sample file) works well in this code.

Try Tao Training failing on creating directory on a standard example - #9 by Morganh

1 Like


Thanks to your help, I succeeded in creating tfrecords.

However, now I have another problem. In above image, the code answered they made a mask file but I cannot find masked images in my path. I checked if the path is wrong, but the path is correct. There is no file in a folder. Is it because there is a problem with my keypoint annotation?

I am afraid your dataset does not contain mask annotations. Suggest you to run bpnet jupyter notebook with COCO2017 dataset to double confirm. TAO Toolkit Quick Start Guide — TAO Toolkit 4.0 documentation

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