Closed Goooyi closed 2 years ago
Cityscapes style: Similar to *_instanceIds.png
in Cityscapes dataset, those png file are Height Width 16bit. Each pixel value x
means that the pixel belongs to the instance ID is x
.
For instance ID x
, the corresponding categories_id is x//1000
. For example, instance ID 3002
, means it's categories_id id is 3002//1000 = 3
Thus, you should set your object with object["inst_id"] = categories_id * 1000 + index
Then
result = bpycv.render_data()
cv2.imwrite("demo-inst.png", np.uint16(result["inst"]))
Thanks for this work, I notice that bpycv support cityscape format, I want to ask is there a demo or doc to demonstrate how to save the results as cityscape format?