Przeglądaj źródła

Update README.md

Kentaro Wada 6 lat temu
rodzic
commit
4d4d26ef04

BIN
examples/instance_segmentation/.readme/draw_label_png_class.jpg


BIN
examples/instance_segmentation/.readme/draw_label_png_object.jpg


+ 4 - 3
examples/instance_segmentation/README.md

@@ -24,12 +24,13 @@ labelme data_annotated --labels labels.txt --nodata
 Fig 1. JPEG image (left), JPEG class label visualization (center), JPEG instance label visualization (right)
 
 
-Note that the reason why the label file is mostly black is it contains only very low label values (ex. `-1, 0, 4, 14`).  
+Note that the reason why the label file is mostly black is it contains only very low label values (ex. `0, 4, 14`), and
+`255` indicates the `__ignore__` label value (`-1` in the npy file).  
 You can see the label PNG file by following.
 
 ```bash
-labelme_draw_label_png data_dataset_voc/SegmentationClass/2011_000003.png   # left
-labelme_draw_label_png data_dataset_voc/SegmentationObject/2011_000003.png  # right
+labelme_draw_label_png data_dataset_voc/SegmentationClassPNG/2011_000003.png   # left
+labelme_draw_label_png data_dataset_voc/SegmentationObjectPNG/2011_000003.png  # right
 ```
 
 <img src=".readme/draw_label_png_class.jpg" width="33%" /> <img src=".readme/draw_label_png_object.jpg" width="33%" />

BIN
examples/semantic_segmentation/.readme/draw_label_png.jpg


+ 3 - 2
examples/semantic_segmentation/README.md

@@ -24,11 +24,12 @@ labelme data_annotated --labels labels.txt --nodata
 Fig 1. JPEG image (left), PNG label (center), JPEG label visualization (right)  
 
 
-Note that the reason why the label file is mostly black is it contains only very low label values (ex. `-1, 0, 4, 14`).  
+Note that the reason why the label file is mostly black is it contains only very low label values (ex. `0, 4, 14`), and
+`255` indicates the `__ignore__` label value (`-1` in the npy file).  
 You can see the label PNG file by following.
 
 ```bash
-labelme_draw_label_png data_dataset_voc/SegmentationClass/2011_000003.png
+labelme_draw_label_png data_dataset_voc/SegmentationClassPNG/2011_000003.png
 ```
 
 <img src=".readme/draw_label_png.jpg" width="33%" />

+ 0 - 3
labelme/cli/draw_label_png.py

@@ -18,9 +18,6 @@ def main():
     args = parser.parse_args()
 
     lbl = np.asarray(PIL.Image.open(args.label_png))
-    if lbl.dtype != np.int32:
-        logger.warn('We recomment numpy.int32 for the label, but it has: {}'
-                    .format(lbl.dtype))
 
     logger.info('label shape: {}'.format(lbl.shape))
     logger.info('unique label values: {}'.format(np.unique(lbl)))