Be warned, 100% vibe coded! A powerful, web-based image annotation tool designed for creating high-quality training data for computer vision models. Built with a focus on simplicity, performance, and ease of use.
Features • Installation • Usage • API Reference • Contributing
- Support for PNG, JPG, JPEG, GIF, and TIFF formats
- Handle large images up to 100MB
- Automatic thumbnail generation for fast loading
- Responsive image viewing with zoom and pan controls
- Bounding Boxes: Draw rectangular annotations with precise coordinate tracking
- Point Annotations: Mark specific points of interest
- Polygon Annotations: Create complex shapes with multiple vertices
- Smart Coordinate Clamping: Automatically restrict annotations to image boundaries
- Ctrl+Click to select multiple annotations
- Ctrl+A to select all annotations
- Drag-to-Move: Reposition selected annotations together
- Copy/Paste: Duplicate annotations within an image or between images
- Batch Editing: Edit multiple annotations simultaneously
- Create custom label categories with unique colors
- Import YOLO Classes: Bulk import from
classes.txtfiles - Random Color Assignment: Auto-generate distinct colors for imported classes
- Delete Categories: Remove categories with confirmation
- Visual Indicators: Color-coded annotation display
- Export to YOLO Format: Generate standard YOLO dataset with:
classes.txtfile- Label files (
.txt) for each image - Organized directory structure
- Automatic coordinate normalization
- Import YOLO Classes: Upload
classes.txtto create categories - Deduplication: Smart handling of duplicate category names
- Validation: Ensures valid annotations before export
- Auto-Fit Zoom: Images automatically fit to screen on load
- Pan Mode: Pan around large images with dedicated tool
- Context Menu: Right-click to edit or delete annotations
- Keyboard Shortcuts:
Ctrl+C/Cmd+C: Copy annotationsCtrl+V/Cmd+V: Paste annotationsCtrl+A/Cmd+A: Select all
- Responsive Design: Adaptive layout that fits any screen size
- Smart Scrolling: Only scrollable areas scroll (categories list, images list)
- SQLite Database: Lightweight, file-based storage
- Project Management: Organize annotations by projects and datasets
- Data Persistence: All annotations saved automatically
- File Management: Automatic cleanup when images are deleted
- Python 3.9 or higher
- pip
-
Clone the repository
git clone https://github.com/yourusername/BOXER.git cd BOXER -
Create and activate a virtual environment
python3.9 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Install the package in development mode
pip install -e . -
Initialize the database
python run.py
-
Access the application Open your browser and navigate to
http://localhost:8000
-
Create a Project
- On first launch, a default project is automatically created
- You can edit the project name by clicking on it
-
Add Label Categories
- Click "Add Category" in the sidebar
- Enter a name and choose a color
- Or import categories from a YOLO
classes.txtfile using "Import Classes"
-
Upload Images
- Click in the upload area or use the "Upload Images" button
- Select one or multiple images
- Images will be automatically processed and thumbnails created
-
Annotate Images
- Select an annotation tool: Select, Bounding Box, Point, or Polygon
- Choose a category from the list
- Draw annotations directly on the image
- Use the context menu (right-click) to edit or delete
-
Manage Annotations
- Use Ctrl+Click to select multiple annotations
- Drag selected annotations to reposition them
- Copy and paste annotations within or between images
- Use the context menu to change categories or delete
-
Export Data
- Click "Export YOLO" to download annotations in YOLO format
- The exported ZIP contains:
classes.txt: List of all categorieslabels/: Directory with label filesimages/: Directory with original images
- Zoom Controls: Use zoom in/out buttons or mouse wheel for precision
- Pan Tool: Enable pan mode to move around large images
- Multi-Select: Hold Ctrl while clicking to select multiple annotations
- Keyboard Shortcuts: Use Ctrl+C/V to copy/paste annotations
Currently no authentication is implemented. All features are accessible to anyone with access to the server.
POST /api/images/upload- Upload one or more imagesDELETE /api/images/{image_id}- Delete an image and its files
POST /api/annotations- Create a new annotationGET /api/annotations/{image_id}- Get all annotations for an imagePUT /api/annotations/{annotation_id}- Update an annotationDELETE /api/annotations/{annotation_id}- Delete an annotation
POST /api/label-categories- Create a label categoryDELETE /api/label-categories/{category_id}- Delete a label category
GET /api/export/yolo- Export all annotations in YOLO formatPOST /api/import/yolo-classes- Import categories from YOLO classes.txt
GET /api/projects- List all projectsPOST /api/projects- Create a new projectPUT /api/projects/{project_id}- Update a project
BOXER/
├── backend/ # Backend API code
│ ├── main.py # FastAPI application
│ ├── database.py # Database models and setup
│ └── image_utils.py # Image processing utilities
├── templates/ # HTML templates
│ ├── labeling.html # Main annotation interface
│ └── base.html # Base template
├── tests/ # Test suite
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ ├── performance/ # Performance tests
│ └── e2e/ # End-to-end tests
├── uploads/ # Uploaded images (auto-generated)
│ ├── images/ # Original images
│ └── thumbnails/ # Thumbnail images
├── requirements.txt # Python dependencies
├── setup.py # Package configuration
└── run.py # Application entry point
# Run all tests
pytest
# Run specific test suite
pytest tests/unit/
pytest tests/integration/
# Run with coverage
pytest --cov=backend tests/# Format code with Black
black backend/ tests/
# Lint with Pylint
pylint backend/
# Type checking with mypy
mypy backend/# Run development server with auto-reload
python run.py
# Or using uvicorn directly
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 style guide
- Use Black for code formatting
- Write comprehensive tests for new features
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with FastAPI
- UI powered by TailwindCSS
- Icons from Font Awesome
- Image processing with Pillow
For issues, questions, or suggestions, please open an issue on the GitHub Issues page.
Made with ❤️ for the computer vision community
⭐ Star this repo if you find it helpful!
