Comments (7)
Hi Yun,
pan = pan_format[:,:,0] + 256 * pan_format[:,:,1] + 256*256*pan_format[:,:,2]
This line converts RGB values to IDs that encode different segments in panoptic COCO format. Please see, note 2 in panoptic segmentation section of COCO data format.
When I print the results after converting to the COCO instance format, it seems that there are all the binary encoding for the "segmentation" rather than the decimal code as the COCO instance format.
Original COCO segmentations are stored as polygons (decimal code represents their vertices) instance_data.py stores in the "segmentation" field RLE encoding of the corresponding mask. Note that COCO API supports the format as well as the polygon description. Current version of Detectron, however, does not support RLE encoded segments. There is a pull request you can use to add the support.
I hope this answers your question. Let me know if something else is not clear.
from panopticapi.
Hi, thanks for your quick reply, I will read them carefully!
from panopticapi.
Sorry to bother you again, when I make the PNG file I only know the color of different categories while for different segments which belong to the same class in the same image how to diff them in color format, I find in the gt_png file, it does not simple as changing the last channel. So I have some problems when making the "id" for every segment. Could you give some suggestions?
Thanks very much!
from panopticapi.
Hi, I think I have known how to make it, thanks!
from panopticapi.
Hi Shen,
In general, IDs are arbitrary. So you can assign any color to each segment except [0, 0, 0]. The only requirement - for different segments in the same image colors must be different.
If you want IDs that look nice, then there is a class ColorGenerator
in format_converter.py script. This class allows to generate colors for segments so that they are similar to class color but each segment will have a unique color. I hope this helps in your case.
from panopticapi.
got it, thanks!
from panopticapi.
Hi Shen,
In general, IDs are arbitrary. So you can assign any color to each segment except [0, 0, 0]. The only requirement - for different segments in the same image colors must be different.
If you want IDs that look nice, then there is a class
ColorGenerator
in format_converter.py script. This class allows to generate colors for segments so that they are similar to class color but each segment will have a unique color. I hope this helps in your case.
i also have some question:
#15
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.