https://voxel51.com/computer-vision-events/visual-ai-hackathon-march-22-2025/
- Toronto Visual AI Hackathon 2025
- Setup Instructions
- Project Structure
- API Usage
- Team Slides
- References
- Dataset(s) sources
- Python 3.10+
- A trained YOLO model checkpoint
-
Clone the repository:
git clone https://github.com/GangGreenTemperTatum/toronto-visual-ai-hackathon-2025.git cd toronto-visual-ai-hackathon-2025
-
Install dependencies:
pip install -r requirements.txt pip install -e .
For Poetry users:
poetry install
-
Important: Update the model path in
src/toronto_visual_ai_hackathon/__init__.py
:MODEL_PATH = "/path/to/your/model.pt" # Change this to your model checkpoint
You can run the application in two ways:
-
Using the
run.py
script:python run.py
-
Using the package directly:
python -m toronto_visual_ai_hackathon
The API server will start at http://localhost:5000.
-
Build the Docker image:
docker build -t yolo-classifier .
-
Run the container with the models directory mounted:
docker run -p 5000:5000 -v "$(pwd)/models:/app/models" yolo-classifier
This ensures the model file is accessible inside the container.
-
Run code formatting and linting:
poetry run ruff check --fix .
-
Run tests:
# Option 1: Run directly python tests/test_request.py --image path/to/test/image.jpg # Option 2: Make executable and run chmod +x tests/test_request.py ./tests/test_request.py --image path/to/test/image.jpg # Option 3: Run as module (if package structure is set up) python -m tests.test_request --image path/to/test/image.jpg
toronto-visual-ai-hackathon-2025/
├── data/ # Data files (not tracked by git)
├── models/ # Model checkpoints
│ └── best.pt # Your trained YOLO model
├── notebooks/ # Jupyter notebooks for exploration
├── scripts/ # Utility scripts
├── src/ # Source code
│ └── toronto_visual_ai_hackathon/
│ ├── __init__.py # Main Flask application
│ └── __main__.py # Entry point for running as module
├── tests/ # Test files
│ └── test_request.py # Script to test the API
├── run.py # Script to run the application
├── setup.py # Package installation configuration
├── requirements.txt # Dependencies
├── pyproject.toml # Poetry configuration
├── Dockerfile # Docker configuration
└── README.md # This file
The application provides a single endpoint for image classification or detection:
POST /predict
Accepts form data with an 'image' file and returns classification or detection results, depending on the model type.
Example using curl:
# Option 1: Use absolute path
curl -X POST -F "image=@/Users/path/to/image" http://localhost:5000/predict
# Option 2: Use current directory path for a file in the same directory
curl -X POST -F "image=@./test_image.jpg" http://localhost:5000/predict
# Option 3: Expand tilde manually for Bash
curl -X POST -F "image=@$HOME/path/to/image" http://localhost:5000/predict
Example response for classification models:
{
"success": true,
"model_type": "classify",
"predictions": [
{
"class": "good_quality",
"class_id": 0,
"confidence": 0.95,
"rank": 1
},
{
"class": "poor_quality",
"class_id": 1,
"confidence": 0.05,
"rank": 2
}
]
}
Example response for detection models:
{
"success": true,
"model_type": "detect",
"predictions": [
{
"class": "face",
"class_id": 0,
"confidence": 0.95,
"bbox": [10, 20, 100, 200]
}
]
}
- Team:
DeepFace-FiftyFive
- Slides available here TODO
- TMU Hackathon Intro slides
- https://voxelgpt.ai/lander
- https://docs.voxel51.com/user_guide/using_datasets.html
- https://github.com/jacobmarks/image-quality-issues
- https://github.com/swheaton/fiftyone-media-anonymization-plugin
- https://docs.voxel51.com/integrations/albumentations.html
- Sample dataset used for hackathon here
- https://paperswithcode.com/
- https://www.perplexity.ai/
- https://huggingface.co/datasets
- Git dorking with
site:arxiv.org
- community.voxel51.com discord #datasets channel
- GitHub
- https://docs.voxel51.com/dataset_zoo/index.html
- https://www.kaggle.com/datasets