Skip to content

Commit 7bb4655

Browse files
Merge pull request #46 from yucornetto/master
Fix TypeError in JSON serialization in 2channels2panoptic_coco_format for PY3
2 parents 118ffab + 7c5176b commit 7bb4655

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

converters/2channels2panoptic_coco_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def convert_single_core(proc_id, image_set, categories, source_folder, segmentat
6464
segment_id, color = id_generator.get_id_and_color(sem)
6565
pan_format[mask] = color
6666
segm_info.append({"id": segment_id,
67-
"category_id": sem})
67+
"category_id": int(sem)})
6868

6969
annotations.append({'image_id': image_info['id'],
7070
'file_name': file_name,

0 commit comments

Comments
 (0)