Hey,
I want to train UNET-18 using tao on my custom dataset. I have my dataset in COCO format with jpg images and i went through this post where i found the following command to convert the COCO Dataset Format to UNET
!tao model unet dataset_convert -f "/workspace/tao-experiments/data/new_merged_annotations.json" -r "/workspace/tao-experiments/results"
The issue is when I execute this command it generates the mask images with black screen only and in logs it shows the status as PASS.
The mask image is just a black image without any mask in it.
Can you help me how can i resolve this issue and create the exact masks to train the UNET.
Are you doing grayscale foreground/background images? In my experience, for grayscale, I have only been able to create these two class models where one class has a mask value 0 and the another typically 255.
Can you share the coco_json_file ?
Notice that the default values are for this case. If your original masks are multiclass and / or your actual images are RGB you need to make changes for that!
While I use unet frequently, I’ve never converted from COCO format. But in order to get good results from Unet, every pixel must have a mask class. So I think you need COCO annotations for every pixel.
Also, I am not an expert in COCO standard, but I recommend you check the COCO annotations in the JSON file you shared, since they seemed to me to be bounding boxes and not segmentation.
How did you generate the COCO annotations?
Can you share a sample image?
Also, note that you are training with very large images, and will need enough GPU memory. With 20GB I run out of memory with 1024 X 704 images with batch size 4
I got to know something that the mask images being generated had two different values 0 and 1. when we see them in images they look complete black after that I changed the non-zero pixels’ value to 255 and i got the mask as i wanted. Then, I proceeded as per notebook and in visualization part i got the images along with the mask. For now i have started the training and will get back to you when it is completed.
Thanks for you feedback.
There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks