Comments (4)
This error should be fixed now. Can you try it again?
from panopticapi.
@alexander-kirillov I have the same issue.
470 500
480 500
490 500
Traceback (most recent call last):
File "cityscapes_gt_converter/cityscapes_panoptic_converter.py", line 119, in
panoptic_converter(original_format_folder, out_folder, out_file)
File "cityscapes_gt_converter/cityscapes_panoptic_converter.py", line 116, in panoptic_converter
save_json(d, out_file)
File "/home/user/.local/lib/python3.7/site-packages/panopticapi/utils.py", line 99, in save_json
json.dump(d, f)
File "/usr/lib/python3.7/json/init.py", line 179, in dump
for chunk in iterable:
File "/usr/lib/python3.7/json/encoder.py", line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
yield from chunks
File "/usr/lib/python3.7/json/encoder.py", line 325, in _iterencode_list
yield from chunks
File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
yield from chunks
File "/usr/lib/python3.7/json/encoder.py", line 325, in _iterencode_list
yield from chunks
File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
yield from chunks
File "/usr/lib/python3.7/json/encoder.py", line 438, in _iterencode
o = _default(o)
File "/usr/lib/python3.7/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type int64 is not JSON serializable
The output json files contains all images till {"id": "munster_000173_000019", "width": 2048, "height": 1024, "file_name": "munster_000173_000019_leftImg8bit.png"}], and the first attempt of annotations:
... "annotations": [{"image_id": "frankfurt_000000_000294", "file_name": "frankfurt_000000_000294_gtFine_instanceIds.png", "segments_info": [{"id": 8405120, "category_id": 7, "area":
from panopticapi.
I fixed it by converting numpy int64 to python integer.
Added the
bbox = [x, y, width, height]; int_bbox = [int(value) for value in bbox]
And changed "area": area, to
"area": int(area),
from panopticapi.
I found a solution here:
https://blog.csdn.net/Zhou_yongzhe/article/details/87692052
tested ok!
pls refer to that.
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.