Comments (8)
You should use panoptic_coco_categories.json
from this repo for --categories_json_file
. The json file has the right color
field.
from panopticapi.
You should use
panoptic_coco_categories.json
from this repo for--categories_json_file
. The json file has the rightcolor
field.
Do we have to modify the panoptic_coco_categories.json
if we are using a custom dataset with different labels? I am getting an error Exception: Panoptic coco categories file does not contain category with id: 26
from panopticapi.
Thanks you for spotting the bug. The code is fixed now. We'll also update annotations later today to add colors there as well.
from panopticapi.
Have you fixed this issue?
I got this problem today. Both panopticapi and annotations files are the latest releases
from panopticapi.
There is a delay with the update due to a migration of the COCO storage. I'm sorry! Nevertheless, current data is correct. New files just have the color field and new segment ID encoding, so there is no need in waiting for them now.
You can use panoptic_coco_categories.json file that has the right color for each category. Also, format_converter.py has been fixed and does not require the color field anymore.
from panopticapi.
Sorry if I was wrong, but I found format_converter.py
still used keywords color
here.
panopticapi/format_converter.py
Line 26 in e30ca01
This is my command to convert the format, the
categories.json
was extracted from the annotation json file of the training data.
(.global_env) cao@slspGPU1:~/workspace/data/COCO$ python panopticapi/format_converter.py --source_folder='../../COCO2018/panoptic/val' --images_json_file='annotations/panoptic_val2017.json' --categories_json_file='./annotations/categories.json' --segmentations_folder='val_seg' --predictions_json_file='val.json'
Output of the command! Thanks
Reading image set information from annotations/panoptic_val2017.json
CONVERTING...
2 channels PNG panoptic format:
Source folder: ../../COCO2018/panoptic/val
TO
COCO format:
Segmentation folder: val_seg
JSON file: val.json
Number of cores: 8, images per core: 625
Core: 0, 0 from 625 images converted
Core: 1, 0 from 625 images converted
Core: 2, 0 from 625 images converted
Core: 3, 0 from 625 images converted
Core: 4, 0 from 625 images converted
Core: 5, 0 from 625 images converted
Core: 6, 0 from 625 images converted
Caught exception in worker thread:
Traceback (most recent call last):
File "/mnt/hdd1/cao/workspace/data/COCO/panopticapi/utils.py", line 12, in wrapper
return f(*args, **kwargs)
File "panopticapi/format_converter.py", line 69, in convert_single_core
color_gererator = ColorGenerator(categories)
File "panopticapi/format_converter.py", line 26, in __init__
self.taken_colors.add(tuple(category['color']))
KeyError: u'color'
Traceback (most recent call last):
File "panopticapi/format_converter.py", line 156, in <module>
args.void)
File "panopticapi/format_converter.py", line 125, in converter
annotations.extend(p.get())
File "/usr/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
KeyError: u'color'
Core: 7, 0 from 625 images converted
Caught exception in worker thread:
Traceback (most recent call last):
File "/mnt/hdd1/cao/workspace/data/COCO/panopticapi/utils.py", line 12, in wrapper
return f(*args, **kwargs)
File "panopticapi/format_converter.py", line 69, in convert_single_core
color_gererator = ColorGenerator(categories)
File "panopticapi/format_converter.py", line 26, in __init__
self.taken_colors.add(tuple(category['color']))
KeyError: u'color'
Caught exception in worker thread:
Traceback (most recent call last):
File "/mnt/hdd1/cao/workspace/data/COCO/panopticapi/utils.py", line 12, in wrapper
return f(*args, **kwargs)
File "panopticapi/format_converter.py", line 69, in convert_single_core
color_gererator = ColorGenerator(categories)
File "panopticapi/format_converter.py", line 26, in __init__
self.taken_colors.add(tuple(category['color']))
KeyError: u'color'
Caught exception in worker thread:
Traceback (most recent call last):
File "/mnt/hdd1/cao/workspace/data/COCO/panopticapi/utils.py", line 12, in wrapper
return f(*args, **kwargs)
File "panopticapi/format_converter.py", line 69, in convert_single_core
color_gererator = ColorGenerator(categories)
File "panopticapi/format_converter.py", line 26, in __init__
self.taken_colors.add(tuple(category['color']))
KeyError: u'color'
Caught exception in worker thread:
Traceback (most recent call last):
File "/mnt/hdd1/cao/workspace/data/COCO/panopticapi/utils.py", line 12, in wrapper
return f(*args, **kwargs)
File "panopticapi/format_converter.py", line 69, in convert_single_core
color_gererator = ColorGenerator(categories)
File "panopticapi/format_converter.py", line 26, in __init__
self.taken_colors.add(tuple(category['color']))
KeyError: u'color'
Caught exception in worker thread:
Traceback (most recent call last):
File "/mnt/hdd1/cao/workspace/data/COCO/panopticapi/utils.py", line 12, in wrapper
return f(*args, **kwargs)
File "panopticapi/format_converter.py", line 69, in convert_single_core
color_gererator = ColorGenerator(categories)
File "panopticapi/format_converter.py", line 26, in __init__
self.taken_colors.add(tuple(category['color']))
KeyError: u'color'
Caught exception in worker thread:
Traceback (most recent call last):
File "/mnt/hdd1/cao/workspace/data/COCO/panopticapi/utils.py", line 12, in wrapper
return f(*args, **kwargs)
File "panopticapi/format_converter.py", line 69, in convert_single_core
color_gererator = ColorGenerator(categories)
File "panopticapi/format_converter.py", line 26, in __init__
self.taken_colors.add(tuple(category['color']))
KeyError: u'color'
Caught exception in worker thread:
Traceback (most recent call last):
File "/mnt/hdd1/cao/workspace/data/COCO/panopticapi/utils.py", line 12, in wrapper
return f(*args, **kwargs)
File "panopticapi/format_converter.py", line 69, in convert_single_core
color_gererator = ColorGenerator(categories)
File "panopticapi/format_converter.py", line 26, in __init__
self.taken_colors.add(tuple(category['color']))
KeyError: u'color'
from panopticapi.
sorry for my mistake, and thanks for you support!
from panopticapi.
@alexander-kirillov , the panoptic_annotation(panoptic_train2017 and val) still have no color attribute when using panoptic2detection_coco_format.py , does the detect task needs color in the annotations? by looking in sample data , panoptic_coco_detection_format.json seems to have the color attribute, would you please guide me to the right Panoptic_annotation files(with color attribute), Thank you
from panopticapi.
Related Issues (20)
- evaluation
- KeyError: 'color' when running panoptic2detection_coco_format.py HOT 2
- Instance ID encoding discrepancy HOT 1
- Detection to Panoptic Segmenetaion Converter creates blank images and no segmenetation coordinates HOT 1
- How to specify instance mask in coco panoptic annotation format?
- where I can get images info in JSON file for COCO2017 datasets?
- Panoptic To Segmentation Converter Bug
- How to create pixel wise class-agnostic image segmentation? HOT 1
- Error when extracting semantic segmentation json from panoptic segmentation json HOT 2
- overlapping between annotations HOT 3
- How to use the result of panoptic segmentation to caculate the evaluation result of PQ metric data?
- how to visualize results for panoptic segmentation on test set
- TypeError: Object of type int64 is not JSON serializable HOT 16
- panoptic_coco_categories.json not found
- Does this work also with polygones, or only with RLE format? HOT 1
- ZeroDivisionError: division by zero
- About the stuff categories annotation.
- convert custom dataset to panoptic coco format
- KeyError when using detection2panoptic_coco_format
- How to make a panoramic segmentation dataset that contains both thing and stuff? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panopticapi.