BossyPaints is a web-based 3D volumetric annotation tool designed for dense painting and proofreading of neuroscience datasets. It enables efficient annotation workflows using a task-based approach with small, manageable volumes, implementing the "small-and-many" proofreading strategy described in Bishop et al. (2020).
- π¨ Interactive 3D Painting: Intuitive lasso-based annotation tools for volumetric data
- π BossDB Integration: Native support for BossDB cloud storage and retrieval
- β‘ Collaboration: Task-based workflow with user assignment and progress tracking
- π Multi-resolution Support: Efficient rendering across different zoom levels
- πΎ Automatic Checkpointing: Save progress incrementally with background processing
- π― Neuroglancer Integration: Generate links to view annotations in Neuroglancer
- π± Touch Support: Optimized for both desktop and tablet workflows
BossyPaints consists of two main components:
- Frontend: SvelteKit-based web application with TypeScript
- Backend: FastAPI server with Python for data processing and task management
- SvelteKit - Web framework
- TypeScript - Type safety
- p5.js - Canvas rendering and interaction
- Tailwind CSS - Styling
- FastAPI - API framework
- uvicorn - ASGI server
- intern - BossDB Python client
- zmesh - 3D mesh generation
- Python 3.11 or higher
- Node.js 18 or higher
- uv (recommended Python package manager)
-
Clone the repository
git clone https://github.com/aplbrain/bossypaints.git cd bossypaints
-
Set up the backend
cd server # Install uv if not already installed curl -LsSf https://astral.sh/uv/install.sh | sh # Install dependencies and run server uv run uvicorn server:app --reload
-
Set up the frontend (in a new terminal)
cd bossypaints npm install npm run dev
-
Access the application
Open your browser and navigate to
http://localhost:5173
For production deployment, use the provided Docker configuration:
docker-compose up -d
-
Obtain BossDB API Token: Visit BossDB Token Management to generate your API token
-
Create a Task:
- Navigate to "Create New Task"
- Enter your BossDB collection, experiment, and channel details
- Define the region of interest (ROI) for annotation
- Specify destination collection for storing annotations
-
Start Annotating:
- Use the paint brush tool to create regions
- Hit backspace to subtract from regions
- Use keyboard shortcuts for efficient workflow
Key | Action |
---|---|
Space | Toggle between paint and pan modes |
Backspace | Subtract current annotation |
, / . | Navigate between Z layers |
n / b | Next/previous segment ID |
d | Delete current annotation |
ESC | Reset view to task center |
Alt + S | Save checkpoint |
Alt + Shift + S | Final submission |
The backend provides a RESTful API for task management:
GET /api/tasks
- List all tasksPOST /api/tasks/create
- Create new annotation taskGET /api/tasks/{task_id}
- Get specific task detailsPOST /api/tasks/{task_id}/checkpoint
- Save annotation checkpointPOST /api/tasks/{task_id}/save
- Final task submission
Create a .env
file in the server directory:
KEYCLOAK_URL=<your-keycloak-url>
KEYCLOAK_CLIENT_ID=<your-client-id>
#KEYCLOAK_CLIENT_SECRET=<your-client-secret>
PUBLIC_BOSSYPAINTS_API_URL=""
Modify bossypaints/src/lib/webpaint/config.ts
for application settings:
export default {
debug: false,
fixedChunkSize: {
width: 512,
height: 512,
depth: 16,
},
chunkLoading: {
radius: 2,
prioritizeCenter: true,
},
};
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Add tests if applicable
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Frontend: Follow Prettier and ESLint configurations
- Backend: Follow PEP 8 with Black formatting
- Use TypeScript for all frontend code
- Include type hints for Python functions
Found a bug? Please report it on our Issues page with:
- Operating system and browser version
- Steps to reproduce the issue
- Expected vs actual behavior
- Screenshots if applicable
- Bishop et al. (2020) for the small-and-many proofreading methodology
- BossDB team for cloud infrastructure
- Neuroglancer for visualization integration
- The neuroscience open-source community
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.