提交 ef2fe1ef 编写于 作者: K Kentaro Wada

Update README.md

上级 f0257b43
...@@ -24,12 +24,13 @@ labelme data_annotated --labels labels.txt --nodata ...@@ -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) 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. You can see the label PNG file by following.
```bash ```bash
labelme_draw_label_png data_dataset_voc/SegmentationClass/2011_000003.png # left labelme_draw_label_png data_dataset_voc/SegmentationClassPNG/2011_000003.png # left
labelme_draw_label_png data_dataset_voc/SegmentationObject/2011_000003.png # right 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%" /> <img src=".readme/draw_label_png_class.jpg" width="33%" /> <img src=".readme/draw_label_png_object.jpg" width="33%" />
...@@ -24,11 +24,12 @@ labelme data_annotated --labels labels.txt --nodata ...@@ -24,11 +24,12 @@ labelme data_annotated --labels labels.txt --nodata
Fig 1. JPEG image (left), PNG label (center), JPEG label visualization (right) 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. You can see the label PNG file by following.
```bash ```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%" /> <img src=".readme/draw_label_png.jpg" width="33%" />
...@@ -18,9 +18,6 @@ def main(): ...@@ -18,9 +18,6 @@ def main():
args = parser.parse_args() args = parser.parse_args()
lbl = np.asarray(PIL.Image.open(args.label_png)) 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('label shape: {}'.format(lbl.shape))
logger.info('unique label values: {}'.format(np.unique(lbl))) logger.info('unique label values: {}'.format(np.unique(lbl)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册