AMBIA (Accurate Mouse Brain Image Analysis) is a tool to fascilitate the analysis of 2D histological Mouse brain images. It is written purely in python and has a modular design and consists of the following modules:
- Cell detection Module
- Localization Module
- Atlas generator module
- Registration Module
AMBIA is intentionally designed with few requirements. You can easily run Ambia on your local computer. Ofcourse computers with higher ram and stronger CPUs make Ambia run faster. Following a the requirements before you install Ambia:
- Python > 3.7
- Install python, ideally version 3.7.9, on your system.
- Download Ambia package files from this Git repository
or you can use
Git clone https://github.com/mrymsadeghi/AMBIA.git - Use the requirements.txt file provided in the package to install the necessary python packages with optimal versions
pip install -r requirements.txt - Run the Main.py file to run Ambia
The files and folders in the Ambia Git repository consists of the following folers:
- Gui Atlases
- Ambia_core
- models
- Processed
Keep this folder structure in your system for Ambia to work correctly.
Here is an explanation of the content and functionality of each folder:
This folder contains the color coded coronal atlases of adult mouse brain or P56 mouse brain. In the file Static_Switches.py if you choose atlas_type = Adult, Ambia will use Adult atlases in this folder. Also it is noteworthy that the color codes of each atlas is contained in the folder Ambia_core/src/atlas_codes.
This folder contains all the python code for the Cell detection, Localization, Atlas generator and Registration Module, as well as the GUI. The file Ambia_core/src/Switches_Static.py contatins parameters that are editable by the users. Parameters such as for choosing the atlas type (atlas_type), turning auto registration on or off (auto_registration) and etc.
This folder contains three different type of data
- Deep learning trained models for the localization module. Including the SL predictor, QL predictor, Group A segmentation modes
- Excel sheet templates in which Ambia exports data
- Files required for generating tilted 2D allen mouse brain atlas from the 3D atlas in the Allen_files folder
This is where the files and reports of the analysis of your mouse brain slices will be saved. Also as an example, we provide analysis of two mouse brain slices from two different slides are in this folder.
Here are some screenshots of AMBIA GUI showing different stages of analysis with a mrxs format slide image.
Loading the Slide image
Slide image is loaded. Ambia detects different mouse brain slices, and now the user can choose which slice to analyse.
Cell Detection
Different methods can be implemented in the cell detection module. Here as default two methods for each channel is provided. The user can choose between methods for each of the green and red channels and parameters can be adjusted in the GUI
Localization
The selected slice can now be registered to a mouse brain atlas. The user can either choose a standard coronal allen atlas based on its number. Or by toggling the "Tilted atlas" switch in the GUI, you can use the deep learning localization module to detect the position of the slice and generate a custom atlas.

Registration
After choosing or generating an atlas, you can toggle auto registration switch on to perform automatic ardent registration. And later choose landmarks to refine the registration.
Analysis Report
Ambia demostrates visually where the detected cells are located in the registered mouse brain slice on the annotated atlas. Also a report is generated in the form of an Excel sheet and a text file which reports the number of detected cells in each brain region.

You can find video tutorials on how to install and use Ambia in the following links:
Installation and how to start
How to Use AMBIA
How to modify the code of AMBIA
link of AMBIA publication
Development of AMBIA on Gitlab since 2020 here
Ardent package Github here