Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myatmyintzuthin/mask_to_coco_json
Segmentation mask to coco json
https://github.com/myatmyintzuthin/mask_to_coco_json
annotations coco-json segmentation
Last synced: 16 days ago
JSON representation
Segmentation mask to coco json
- Host: GitHub
- URL: https://github.com/myatmyintzuthin/mask_to_coco_json
- Owner: myatmyintzuthin
- License: apache-2.0
- Created: 2023-04-03T08:48:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-03T10:06:16.000Z (over 1 year ago)
- Last Synced: 2023-08-02T10:39:38.664Z (over 1 year ago)
- Topics: annotations, coco-json, segmentation
- Language: Python
- Homepage:
- Size: 132 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Segementation Mask to COCO Json Converter
| mask | original | json_visualization |
|:-----------------------------------:|:--------------------:|:-----------------------:|
| | |### 1. Install dependencies
```
pip install -r requirements.txt
```
### 2. Input Folder Structure
```
mask
|_ image_001.png
|_ image_002.png
|_ ...
```### 3. Convert Segmentation to COCO Json annotation
```
python main.py -i mask
```
option: \
-i : mask directory### 4. Visualize COCO json annotation
To cross check generated segmentation data, visualize it by drawing on original image.
```
python visualize_segmentation.py -i image -a mask.json
```
option: \
-i : original image directory\
-a : json annotation file### 5. Change class name and color
Modify `config/config.yaml`.
## Reference
- https://github.com/chrise96/image-to-coco-json-converter