|
@@ -32,7 +32,7 @@ labelme_json_to_dataset apc2016_obj3.json -o apc2016_obj3_json
|
|
It generates standard files from the JSON file.
|
|
It generates standard files from the JSON file.
|
|
|
|
|
|
- [img.png](apc2016_obj3_json/img.png): Image file.
|
|
- [img.png](apc2016_obj3_json/img.png): Image file.
|
|
-- [label.png](apc2016_obj3_json/label.png): Int32 label file.
|
|
|
|
|
|
+- [label.png](apc2016_obj3_json/label.png): uint8 label file.
|
|
- [label_viz.png](apc2016_obj3_json/label_viz.png): Visualization of `label.png`.
|
|
- [label_viz.png](apc2016_obj3_json/label_viz.png): Visualization of `label.png`.
|
|
- [label_names.txt](apc2016_obj3_json/label_names.txt): Label names for values in `label.png`.
|
|
- [label_names.txt](apc2016_obj3_json/label_names.txt): Label names for values in `label.png`.
|
|
|
|
|
|
@@ -50,9 +50,9 @@ and please use `PIL.Image.open` to avoid unexpected behavior:
|
|
>>> label_png = 'apc2016_obj3_json/label.png'
|
|
>>> label_png = 'apc2016_obj3_json/label.png'
|
|
>>> lbl = np.asarray(PIL.Image.open(label_png))
|
|
>>> lbl = np.asarray(PIL.Image.open(label_png))
|
|
>>> print(lbl.dtype)
|
|
>>> print(lbl.dtype)
|
|
-dtype('int32')
|
|
|
|
|
|
+dtype('uint8')
|
|
>>> np.unique(lbl)
|
|
>>> np.unique(lbl)
|
|
-array([0, 1, 2, 3], dtype=int32)
|
|
|
|
|
|
+array([0, 1, 2, 3], dtype=uint8)
|
|
>>> lbl.shape
|
|
>>> lbl.shape
|
|
(907, 1210)
|
|
(907, 1210)
|
|
```
|
|
```
|