This project provides a complete and modular pipeline to detect organoids from brightfield microscopy images, with optional quantification of GFP-positive regions from corresponding fluorescence images.
- Works with brightfield-only images or brightfield + GFP
 - Detects irregular and fragmented organoids as a single object
 - Computes key morphological features:
- Area
 - Centroid
 - Perimeter
 - Circularity
 
 - If GFP is provided:
- Quantifies GFP+ area
 - Calculates mean and total GFP intensity
 
 - Generates annotated overlay images for visualization
 
More info on the features: https://github.com/arka2696/HPC-Organoid-Quant/blob/main/FeatureExplanation.md
Organised_files/
└── B16 Spheroid_10% FBS/
    └── B16_control/
        └── B16 day 3/
            ├── BRIGHTFIELD_16173.jpg
            ├── BRIGHTFIELD_16174.jpg
            └── ...
OUTPUT/
├── B16 Spheroid_10% FBS/
│   └── B16_control/
│       └── B16 day 3/
│           ├── masks/
│           │   ├── mask_16173.png
│           │   └── ...
│           └── overlays/
│               ├── overlay_16173.png
│               └── ...
│
└── organoid_gfp_analysis.csv   ← all image results combined here
git clone https://github.com/yourusername/Organoid_GFP_Analysis.git
cd Organoid_GFP_AnalysisBest used with Google Drive integration.
- Open 
notebooks/organoid_analysis.ipynb - Update paths to your own brightfield and GFP images
 - Run all cells
 
- Create the conda env with this command:
conda env create -f environment.yml conda activate organoid-env
 - OR, create a python venv with thsi command:
python -m venv organoid-env source organoid-env/bin/activate # or .\organoid-env\Scripts\activate on Windows pip install -r requirements.txt
 
4. Creating a loadable jupyter-kernel: This is needed as if we are runing the code from jupyter lab or VS-code we need to load python kenrnel
- A kernel can be created by the following command:
python -m ipykernel insatll --user --name organoid-env --display-name "organoid-env"
 
- 
We can launch the
organoid-envconda env in two ways: 1. via anaconda prompt or 2. we can directly load the conda kernel inVS-Code - 
- In the command line/terminal type in the following command:
 
conda activate organoid-env
then
jupyter lab
The
organoid-envis loaded by default, but if its not loaded, we can select the kernel from the dropdown box on the top right hand. - 
- Now you can directly run the 
.ipynbnotebooks within the jupyter-lab or directly execute the python script from the command line. 
 - Now you can directly run the 
 
- 
.csvfile with organoid measurements - 
Overlay image:
- 🔵 Organoid outline
 - 🔴 GFP+ region (if applicable)
 
 
All dependencies are standard and available in Google Colab:
OpenCVNumPyMatplotlibscikit-imagePandas
If you want to run locally, create a requirements.txt:
pip install -r requirements.txt- The script accepts a broad format of images
 - If your organoids are fragmented, the pipeline includes morphological merging to treat them as one object
 - GFP quantification thresholds can be adjusted in the notebook
 
For questions or suggestions, feel free to open an issue or reach out via GitHub.
Cite as: Arkajyoti sarkar. (2025). HPC-Organoid-Quant (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.15738206This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.


