clusterflux / README.md
rayh's picture
Deploy latest YOLO model and app (version 20250422.7)
0abc32b
|
raw
history blame
2.08 kB
metadata
title: ClusterFlux
emoji: 🧬
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 4.0.0
app_file: app.py
pinned: false

ClusterFlux: YOLO Segmentation Model Server

ClusterFlux is an interactive and API-ready Gradio Space for orbital streak image segmentation. It serves a YOLO-based segmentation model, with version tracking and reproducibility features for scientific workflows.

  • Model version is shown in the UI and included in API responses.
  • Weights are managed with Git LFS for large file support.
  • Designed for integration with annotation tools (e.g., CVAT) and downstream astronomical data pipelines.

Quickstart

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the server locally:
python app.py
  1. Deploy to Hugging Face Spaces:
    • Push this directory to a new Space as a Gradio app.

Usage

  • Upload an image to receive a segmentation mask generated by the latest YOLO model.
  • The current model version is always visible for traceability.
  • For programmatic access, use the Gradio API endpoint; the response includes both the mask and version.

Deployment Workflow

  • Model weights are copied into weights/best.pt and versioned via the VERSION file.
  • deploy.sh automates model update and Hugging Face Space deployment, with Git LFS support.

Integration

  • Replace the dummy segment function in app.py with your YOLO model inference code.
  • The API will accept an image and return a segmentation mask (as an image).

Notes

  • Add any additional dependencies to requirements.txt as needed.
  • For Spaces, ensure your model weights are included or downloadable.

Citation & Context

This tool is part of the Swinburne DECam synthetic data and galaxy segmentation research project. For scientific use, please cite appropriately and refer to the project thesis for detailed methodology and rationale.


For more details, see the Hugging Face Spaces config reference.