Microglia Analyzer
What is it?
A Napari plugin that allows for the segmentation and classification of microglia on 2D fluorescent images. Z-stacks and time series are not handled.
- Segments the microglia with a UNet2D model.
- Creates classified bounding-boxes with a YOLOv5.
- Attributes a class to each cell.
- Extracts graph information about the cells.
We end up with a ".csv" (separated with tabulations instead of commas) file containing all these metrics.
- 🐛 Found a bug?: https://github.com/MontpellierRessourcesImagerie/microglia-analyzer/issues
- 🔍 Need some help?: mri-cia@mri.cnrs.fr
01. How to install/upgrade it?
Install
| Action | Command |
|---|---|
| Install | pip install git+https://github.com/MontpellierRessourcesImagerie/microglia-analyzer.git napari[all] |
| Upgrade | pip install --upgrade git+https://github.com/MontpellierRessourcesImagerie/microglia-analyzer.git |
02. How to use it?
For more details, check the detailed documentation.
A. Open the widget
- First of all, you need all your images to be converted to TIFF, and placed in the same folder.
- Once Napari is opened, you can visit your plugins list. It should contain a
Microglia Analyzerentry.Tiles Creatorallows you to create patches to annotate if you ever want to retrain the UNet or the YOLOv5.Annotations Helperallows you to define and create classified bounding-boxes exported under the YOLOv5 format as well as masks. This widget is meant to help you create some ground-truth data.Microglia Analyzercontains the whole analysis workflow.
B. Load your images
- Click the
📁 Sources folderbutton and navigate to the folder containing your TIFF images before pressing OK. - In the drop-down menu below, you can choose the image on which you want to run the analysis.
- In the "Calibration" field, you just have to provide the size of your pixels in physical unit and confirm. Your image may look small after this step, so you may want to press the button with a little picture of home in the lower-left corner of Napari's window.
C. Segment your microglia
- Press the
🔍 Segmentbutton and wait for the labeled microglia to show up. - The first time, this step may take a little longer as the plugin must download the deep-learning model from MRI's server.
- You can adjust the area of the smallest tolerated object either before or after the segmentation, both ways work.
- At this point, each individual microglia should be represented by its own color.
- We focused the segmentation on the "graph" produced by microglia, so the soma won't look thicker than any other part of the microglia.
D. Classify your microglia
- Click the
Classifybutton. - Once again, a model has to be downloaded from MRI's server.
- By the end of this step, you should have a colored bounding-box around each tolerated microglia.
- The color indicates which class it belongs to (amoeboid, intermediate ou homeostatic).
- The color code should show up in the array below the classification button.
- If you wish, you can adjust the prediction threshold ("how sure the model is about what it sees")
E. Measure your microglia
- If you click on the
📊 Measurebutton, the skeleton of each microglia should appear. - The measures are generated and stored in a
.tsvfile located in thecontrolssub-folder (auto-generated in your images' folder)
F. Analyze the whole folder
- Once you got to that point, each parameter is correctly set (as you just used them for an image), so you click the
▶ Run batchto apply them to the whole folder. - The button should now indicate
■ Kill batch (i/N). You can click it to interrupt the execution.iis the rank of the current image, andNis the number of images detected in the folder. - By the end of the run, the button should be normal again, and a
results.tsvfile should be located in thecontrolsfolder.
Metadata
Release files for microglia-analyzer 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| microglia_analyzer-2.1.1.tar.gz | 84.9 kB | Without provenance | Details for microglia_analyzer-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| microglia_analyzer-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for microglia_analyzer-2.1.1-py3-none-any.whl |
Total release size: 180.2 kB
Release files / microglia_analyzer-2.1.1.tar.gz
| Download URL | microglia_analyzer-2.1.1.tar.gz |
|---|---|
| Size | 84.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76818af85fb71feb7db9c4281f17f6e0e8ede13615ecebef98a4c9b616952137
|
|
BLAKE2b-256 checksum How to use checksums |
032f6952321bc16e297b39e7c84514faef407fbb1206b37024f06b440fcca2fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / microglia_analyzer-2.1.1-py3-none-any.whl
| Download URL | microglia_analyzer-2.1.1-py3-none-any.whl |
|---|---|
| Size | 95.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48e37618d72077ffac237377d8d50d54e0b99d942e11b83368e189d683bfa304
|
|
BLAKE2b-256 checksum How to use checksums |
1edce663f33d9e518a986ad099df7c6ef03280b834bcd3f9ae6f693bb4199777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for microglia-analyzer 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.