GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - KeyOfSpectator/ImageAnnotationTools

BranchesTags
Open more actions menu

Latest commit

 

History

24 Commits
24 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
__pycache__
__pycache__
 
 
coco_json_merge_split_tool
coco_json_merge_split_tool
 
 
double_check_iou_tool
double_check_iou_tool
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
utils.py
utils.py
 
 

Repository files navigation

Image Annotation Tools

This project is associated with the paper: https://www.nature.com/articles/s41597-026-06651-3

Features

1. Double Check IoU Annotation Tool

in ./double_check_iou_tool folder

Double check 2 coco json. Just for bbox, not for segmentation.

Keep the bbox with IoU(Intersection over Union) greater than the threshold among the different two group of annotations from two people in the same image.

The remaining annotations require further manual review.

# how to run it

e.g.
    
coco_json1_file_path = 'J:\\workspace\\xxxxxx\\dataset1-annotator1.json'
coco_json2_file_path = 'J:\\workspace\\xxxxxx\\dataset1-annotator2.json'

double_check_two_cocos(coco_json1_file_path, coco_json2_file_path, os.path.join(os.path.abspath(os.curdir), "results"))

<!--Groups represent the two annotators.-->
<!--Results contains two group folders and one conclusion folder.-->
<!--Each group have matched and suspected annotations.-->

<!--Double-check result will save in conclusion folder.-->
<!--when one annotaion is matched with another annotation, the matched annotation with smaller area box will be saved in matched conclusion folder.-->
<!--The final conclusion merge all matched annotations and suspected annotations with different color.-->
<!--# color green represent matched. #1A971E-->
<!--# color red represent not matched. #C9151A-->

<!--Results is a batch of coco json files of one labeled image. For convenient import, conclusion result's metadata is based on group1 image, including: image id/file_name/file_path, and based on group1's category id.-->

# result file structure:

results/
    conclusion/
        all/
            image1.json  # merged all matched and suspected annotations
            image2.json
        matched/
            image1.json
            image2.json
        suspected/
            image1.json
            image2.json
    group1/
        matched/
            image1.json
            image2.json
        suspected/
            image1.json
            image2.json
    group2/
        matched/
            image1.json
            image2.json
        suspected/
            image1.json
            image2.json


2. COCO Json Merge / Split Tool

Split Tool: Split the coco json of one dataset with multiple labeled images, to a batch of coco json files of one labeled image.

in ./coco_json_merge_split_tool folder

# Split coco json
# how to run it
split_coco(input_file_path, output_dir_path)

Merge Tool: Merge a batch of coco json files of one labeled image to one coco json of one dataset with multiple labeled images.

# Merge coco json
# how to run it

<!--Merge the files in input dir, each file is a coco json file for one image.-->
input_dir_path = "J:\\workspace\\xxxxxx\\splited_double_check"

<!--Merge coco json result will be saved in this file-->
output_file = "J:\\workspace\\xxxxxx\\merged_double_check\\merged_double_check.json"

<!--The output file's image id and category id will be the same as the metadata file, mapping the same image filename and category name.-->
coco_metadata_json_file = "J:\\workspace\\xxxxxx\\dataset1-metadata.json"

<!--Optional Param. If you use the original dataset with same image id, you can set this file path to "".-->
<!--If you want to import the result to another dataset, you need to remap the image id, you can use this file path.-->
<!--This image id mapping will reset the image id with the same image file_name. is a image json array in coco image rest api format.-->
<!-- file content e.g.
        [
            {
            "id": 2030,
            "file_name": "Bthe_01.jpg",
            "annotated": false,
            "annotating": [],
            "num_annotations": 0
            },
            ...
        ]
-->
image_id_remapping_file = "J:\\workspace\\xxxxxx\\double_check_dataset_image_mapping.json"

merge_coco(input_dir_path, output_file, coco_metadata_json_file, image_id_remapping_file)

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

5 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.