Metadata-Version: 2.4
Name: flashstudio
Version: 0.1.2
Summary: Interactive Training & Inference UI for FlashDet — runs on Google Colab
Author: Gaurav14cs17
License: Apache-2.0
Project-URL: Homepage, https://github.com/FlashVision/FlashStudio
Project-URL: Repository, https://github.com/FlashVision/FlashStudio
Keywords: object-detection,flashdet,training,inference,ui,colab
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: streamlit>=1.28.0
Requires-Dist: plotly>=5.0
Requires-Dist: pandas>=1.5
Requires-Dist: pillow>=9.0
Requires-Dist: numpy>=1.21
Requires-Dist: pyngrok>=6.0
Provides-Extra: full
Requires-Dist: pyngrok>=6.0; extra == "full"
Requires-Dist: torch>=2.0; extra == "full"
Requires-Dist: opencv-python>=4.5; extra == "full"
Provides-Extra: colab
Requires-Dist: pyngrok>=6.0; extra == "colab"
Provides-Extra: dev
Requires-Dist: ruff; extra == "dev"
Requires-Dist: pytest; extra == "dev"

# ⚡ FlashStudio

[![PyPI version](https://badge.fury.io/py/flashstudio.svg)](https://pypi.org/project/flashstudio/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)

**Interactive Training & Inference UI for FlashDet** — runs locally or on Google Colab with a Streamlit interface.

<p align="center">
  <img src="docs/mockups/flashstudio_streamlit_mockup.png" width="800" alt="FlashStudio UI"/>
</p>

## Features

- 🏋️ **Training Dashboard** — Real-time monitoring with live loss curves, per-epoch visualizations, GT verification
- 🧠 **Model Config** — All 6 FlashDet sizes + YOLOv8/v9/v10/v11/YOLOX with accurate params
- 🔍 **Inference Pipeline** — 4-step wizard: Model → Data → Zone → Run (17 solutions, 6 trackers)
- 📤 **Export** — ONNX export with FP16 auto-generated weights
- 📦 **Data** — Native `flashdet download` datasets + custom upload (COCO/VOC/YOLO formats)
- 📊 **Dashboard** — Overview with recent training runs from workspace
- 🚀 **Colab Support** — ngrok tunneling for remote access

## Install

```bash
pip install flashstudio
```

### Install with all dependencies (PyTorch + OpenCV + ngrok)

```bash
pip install flashstudio[full]
```

### Install FlashDet (required for training/inference)

```bash
pip install git+https://github.com/FlashVision/FlashDet.git
```

### Development install

```bash
git clone https://github.com/FlashVision/FlashStudio.git
cd FlashStudio
pip install -e .
```

## Quick Start

### CLI

```bash
flashstudio --port 8501
```

### Python (Streamlit directly)

```bash
streamlit run flashstudio/app.py
```

### Python API (Google Colab)

```python
from flashstudio import launch
launch()  # Opens ngrok tunnel in Colab, localhost otherwise
```

## Google Colab

| Notebook | Description | Link |
|----------|-------------|------|
| Training | Train FlashDet models | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/FlashVision/FlashStudio/blob/main/notebooks/FlashStudio_Train.ipynb) |
| Inference | Run detection on images/video | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/FlashVision/FlashStudio/blob/main/notebooks/FlashStudio_Inference.ipynb) |

## Supported Models

| Model | Params | Best For |
|-------|--------|----------|
| FlashDet-Pico | ~298K | Edge / MCU |
| FlashDet-Nano | ~790K | Embedded / IoT |
| FlashDet-Small | ~1.8M | General purpose |
| FlashDet-Medium | ~3.6M | High accuracy |
| FlashDet-Large | ~5.8M | High accuracy |
| FlashDet-X | ~9.0M | Max accuracy / Server |
| YOLOv8/v9/v10/v11/YOLOX | Varies | General YOLO |

## Architecture

```
FlashStudio/
├── flashstudio/
│   ├── __init__.py              # Package init + launch() export
│   ├── app.py                   # Main Streamlit app (wizard flow)
│   ├── launcher.py              # Colab/local launcher with ngrok
│   ├── cli.py                   # CLI entrypoint
│   ├── pages/
│   │   ├── dashboard.py         # Overview + recent training runs
│   │   ├── data.py              # Dataset upload/download
│   │   ├── model.py             # Architecture & hyperparameter config
│   │   ├── training.py          # Training monitor (reads real workspace)
│   │   ├── export.py            # ONNX export
│   │   └── inference.py         # 4-step inference pipeline
│   ├── components/
│   │   ├── sidebar.py           # Navigation sidebar
│   │   ├── styles.py            # Custom CSS
│   │   └── wizard.py            # Step indicator & navigation
│   └── utils/
│       └── device.py            # GPU/environment detection
├── notebooks/
│   ├── FlashStudio_Train.ipynb
│   └── FlashStudio_Inference.ipynb
├── .streamlit/config.toml
├── pyproject.toml
└── README.md
```

## Requirements

- Python >= 3.9
- FlashDet (`pip install git+https://github.com/FlashVision/FlashDet.git`)
- GPU recommended for training (T4 or better)

## License

Apache-2.0
