This is a complete image annotation tool that supports:
- Visual Image Display - Display images on Canvas
- Mouse Drawing Annotation Boxes - Drag mouse to create rectangular annotations
- Auto Calibration - Automatically add missing images from folders
- ID Consistency - Automatically maintain image and annotation ID order
- Category Management - Support multiple annotation categories
- Batch Processing - Traverse all images missing annotations
Double-click Launch Advanced Annotation Editor.bat or run:
python annotation_editor_advanced.py- Click "📁 Open Annotation File" to select
annotations.json - The program will automatically detect the image folder, or manually select the image folder
- The program automatically loads all images and adds missing items
1. Use navigation buttons (◀️ ▶️) or click left list to select images
2. Select annotation category on the right
3. Drag mouse on image to draw annotation box
4. Annotations are automatically saved to list
5. Continue to next image
1. Click toolbar "🔄 Show Missing" or right "⚡ Auto Calibrate All"
2. Program automatically filters all images missing annotations
3. Annotate each image in order
4. Click "Next" to continue
5. After all completed, click "💾 Save"
- ⏮️ First: Jump to first image
◀️ Previous: Previous image▶️ Next: Next image- ⏭️ Last: Jump to last image
- ➕ Zoom In: Zoom in image display
- ➖ Zoom Out: Zoom out image display
- 🔍 Fit: Auto fit to window size
- 1:1: Display actual size
- Click "➕ Add Annotation" to enter annotation mode
- Press and hold left mouse button on image and drag
- Release mouse to complete annotation box drawing
- Right-click to cancel current drawing
- Select annotation in "Current Image Annotations" list on right
- Click "Edit" button to modify
- Or click "Delete" button to remove
- Select category in "Annotation Categories" area
- Click "➕ Add Category" to create new category
- Newly drawn annotations will use currently selected category
- All: Display all images
- Annotated: Only show annotated images
- Missing: Only show images needing annotation ⭐
- Search Box: Search by filename
- Automatically filter images missing annotations
- Guide you to complete annotations one by one
- Ensure all images have annotations
Display:
- Total images
- Annotated/unannotated image counts
- Category annotation count statistics
Check:
- Duplicate IDs
- Invalid reference relationships
- Data integrity
1. Launch program
↓
2. Open annotation file (annotations.json)
↓
3. Select image folder (萎缩性胃炎/)
→ Program automatically adds missing images and reassigns continuous IDs
↓
4. Click "⚡ Auto Calibrate All"
↓
5. Draw annotation boxes for each missing annotation image
- Drag mouse to draw rectangle
- Can draw multiple annotation boxes per image
↓
6. Click "Next" to continue
↓
7. After all completed, click "📊 Statistics" to confirm
↓
8. Click "✓ Validate Data" to check
↓
9. Click "💾 Save" to save all changes
1. Filter to "Annotated" in left list
2. Click image needing correction
3. Select annotation to modify in right annotation list
4. Click "Delete" to remove incorrect annotation
5. Redraw correct annotation box
6. Save changes
┌─────────────────────────────────────────────────────────┐
│ Toolbar: File|Navigation|Annotation|Save │
├──────────┬──────────────────────────┬───────────────────┤
│ │ │ │
│ Image │ Image Display Area │ Annotation │
│ List │ (Zoomable/Drawable) │ Management │
│ │ │ - Category Sel │
│ - Search│ Tools: Zoom Controls │ - Current List │
│ - Filter│ │ - Edit/Delete │
│ │ │ - Quick Ops │
│ │ │ │
└──────────┴──────────────────────────┴───────────────────┘
│ Status Bar: Current Status | File Info │
└─────────────────────────────────────────────────────────┘
Ctrl+S: Save←/→: Previous/Next imageDelete: Delete selected annotationEsc: Cancel drawing
- Auto Backup: Program automatically adds missing images to annotation file, recommend backing up original file
- ID Management: Program automatically maintains ID continuity and consistency
- Save Reminder: Prompt to save if unsaved changes when closing
- Annotation Format: Annotation boxes use COCO format
[x, y, width, height]
{
"images": [
{
"id": 1,
"file_name": "14215.jpg",
"width": 576,
"height": 498
}
],
"annotations": [
{
"id": 1,
"image_id": 1,
"category_id": 1,
"bbox": [100, 50, 200, 150],
"area": 30000,
"iscrowd": 0,
"segmentation": []
}
],
"categories": [
{
"id": 1,
"name": "lesion_area",
"supercategory": ""
}
]
}A: Check image folder path is correct, ensure image formats are supported (.jpg, .png, etc.)
A: Ensure "➕ Add Annotation" button is clicked and a category is currently selected
A: Check file not occupied by other programs, has write permissions
A: After loading annotation file, program automatically sorts by filename and reassigns continuous IDs
| Feature | Basic Version (annotation_corrector_gui.py) | Advanced Version (annotation_editor_advanced.py) |
|---|---|---|
| View List | ✓ | ✓ |
| Add/Delete Images | ✓ | ✓ (Auto) |
| Display Images | ✗ | ✓ |
| Draw Annotation Boxes | ✗ | ✓ |
| Annotation Management | ✗ | ✓ |
| Category Management | ✗ | ✓ |
| Batch Annotation | ✗ | ✓ |
| Image Zoom | ✗ | ✓ |
- Python 3.6+
- Pillow (PIL):
pip install pillow - tkinter (Usually included with Python)
Suitable for creating annotations from scratch for a batch of images
Suitable for some images having annotations, need to add annotations for remaining images
Suitable for existing annotations needing correction
Suitable for checking and validating all annotations correctness
Suggested recording videos for following operations:
- Basic annotation flow demonstration
- Auto calibration function usage
- Category management
- Data validation and saving
Development Version: v2.0 Advanced Update Date: 2025-10-13
Support: Contact development team if issues encountered