MIRA - Microscopy Image Recognition and Analysis
MIRA is a professional PyQt5 application designed for real-time spore detection and quantification using deep learning (YOLO) and microscopy imaging.
📖 Documentation
Full documentation is available at mira-microscopy.readthedocs.io
The documentation includes:
- Detailed installation guides for all platforms.
- Comprehensive usage tutorials.
- Hardware configuration and camera settings.
- Advanced data analysis and export workflows.
Key Features
- 🔬 Real-time Analysis: Live video feed with YOLO-based object detection.
- 🧪 Standardized Chambers: Built-in support for Malassez and KOVA slides.
- 📊 Automated Quantification: Automatic calculation of spores/mL and titer with dilution factors.
- 📈 Professional Export: Multi-sheet Excel reports with statistical analysis (Mean, SD, CV%).
- 📷 High-Res Support: Optimized for ArduCam 20MP and industrial microscopy cameras.
- 🎨 Modern UI: Auto dark/light mode (OS detection), HiDPI support, resizable panels, and real-time quality indicators.
Installation
Requirements
- Python 3.10 to 3.13
- A USB microscopy camera (ArduCam recommended)
Quick Install (PyPI)
pip install mira-microscopy
pip install opencv-python-headless --force-reinstall # Linux only — avoids Qt conflict
Install from Source
git clone https://forge.ird.fr/phim/sravel/mira.git
cd mira
pip install .
pip install opencv-python-headless --force-reinstall # Linux only
Quick Start
- Launch MIRA: Run
mirain your terminal. - Configure: Select your camera and load a YOLO
.ptmodel. - Analyze: Select a chamber on the interactive grid, set your dilution factor, and capture images.
- Export: Click "Save to Excel" to get your full report.
Pretrained Models
Four pretrained YOLO models accompany the MIRA paper (Mejias et al., 2026) and are distributed on the CIRAD Dataverse:
- Dataverse : https://dataverse.cirad.fr/dataverse/MIRA
- DOI : 10.18167/DVN1/E0JRDL
| Model | Task | Weights (Dataverse) | mAP@0.5 |
|---|---|---|---|
| M. oryzae spore counter | Detect (yolo26m) | spore-m-oryzae-xzewf_v9_yolo26m_20260721_0.765.pt |
0.765 |
| F. oxysporum micro/macroconidia | Detect (yolo26m) | spore-fusarium-object_v6_yolo26m_20260721_0.884.pt |
0.884 |
| P. fijiensis spore + surface | Segment (yolo26m-seg) | spore-fijiensis-seg_v6_yolo26m-seg_20260721_0.766.pt |
0.770 |
| Mix multi-genus (6 rice-associated) | Segment (yolo26m-seg) | curvularia-genus_v12_yolo26m-seg_20260721_0.820.pt |
0.823 |
The Mix model covers 6 rice-associated fungal genera: Alternaria, Bipolaris, Curvularia, Exserohilum, Fusarium, Pyricularia.
Weights are distributed compressed with xz -9 (~12 % smaller). Decompress before use:
# Linux / Mac
xz -d *.pt.xz # produces the .pt files
# Windows
# Right-click each .pt.xz → 7-Zip → Extract Here
Then place the .pt files in <repo>/models/, or set the environment variable:
export MIRA_MODELS_DIR=/path/to/models
Training your own models
MIRA models are trained with the VEGA CLI (Versatile Engine for Generic Automated-training):
https://forge.ird.fr/phim/sravel/vega
VEGA handles Roboflow dataset download, SLURM job submission, per-run reporting, and canonical weight naming. See its README for the full workflow.
Authors
Development Team:
-
Sébastien RAVEL (CIRAD) - Lead Developer
- Email: sebastien.ravel@cirad.fr
- Role: Architecture, core features, camera integration
-
Joffrey MEJIAS (CIRAD) - Co-Developer
- Email: joffrey.mejias@cirad.fr
- Role: UI/UX, detection algorithms, data export
Institution: CIRAD (Centre de coopération internationale en recherche agronomique pour le développement)
License
This project is licensed under the GNU General Public License v3.0 or later (GPLv3+).
Free for non-commercial use. For commercial licensing, contact the authors.
Citation
If you use MIRA in your research, please cite the software AND the accompanying dataset:
@software{mira2026,
title = {MIRA: Microscopy Image Recognition and Analysis},
author = {Ravel, S{\'e}bastien and Mejias, Joffrey and Adreit, Henri and Blanc, Ana{\"e}lle and Lubin, Nadia and Jolivet, Cassandre and Guyot, Valentin and Brayle, O{\"i}ana and Poncelet, Nicolas and Fournier, Elisabeth and Wicker, Emmanuel and Carlier, Jean and Tharreau, Didier},
year = {2026},
institution = {CIRAD, UMR PHIM, Montpellier, France},
url = {https://forge.ird.fr/phim/sravel/mira},
version = {1.0.0}
}
@dataset{mira_dataverse_2026,
title = {MIRA: dataset and trained YOLO weights for automated counting and sizing of fungal spores --- France, 2024--2026},
author = {Ravel, S{\'e}bastien and Mejias, Joffrey and others},
year = {2026},
publisher = {CIRAD Dataverse},
doi = {10.18167/DVN1/E0JRDL},
url = {https://doi.org/10.18167/DVN1/E0JRDL}
}
Support
For questions, bug reports, or feature requests:
- 📧 Email: sebastien.ravel@cirad.fr
- 🐛 Issues: https://forge.ird.fr/phim/sravel/mira/issues
- 📖 Docs: https://mira-microscopy.readthedocs.io
Made with ❤️ by CIRAD for the scientific community
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mira_microscopy-1.0.0.tar.gz.
File metadata
- Download URL: mira_microscopy-1.0.0.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b2fb90b3047f51a5832f9566a90a3dc1fbccd0299988a1d8ada7ce8fa300e3c
|
|
| MD5 |
c815f11e39d79fe1f409276524ae729b
|
|
| BLAKE2b-256 |
e2530de4092b1316b6477d653b1ac2953700672bd2d6a76c75c73f4fb9da1076
|
File details
Details for the file mira_microscopy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mira_microscopy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a741583df2f43f85e3e3495ca5c95f3dfcda03255fbe354a3f5b3792e39fc290
|
|
| MD5 |
721da5d51f139cddfb722c635f5cc578
|
|
| BLAKE2b-256 |
d801f98c90a894758633a59e1f59d88edfdd904f56e395405efa00ca49f47d02
|