Open-source project
bnsreenu/python_for_microscopists avatar
bnsreenu/python_for_microscopists

python_for_microscopists: a flat folder of numbered tutorial scripts

https://www.youtube.com/channel/UC34rW-HtPJulxr5wp2Xa04w?sub_confirmation=1

4,426 stars2,497 forksJupyter NotebookMIT

At a glance

What is it?
Dr. Sreenivas Bhattiprolu's repository holds the code backing his DigitalSreeni YouTube lessons on image analysis and machine learning for microscopy, numbering every file in lesson order so the sequence reads cleanly and the dependencies stay invisible.
Who is it for?
Adopt this repository if you are working through the DigitalSreeni videos and want the exact files the instructor typed while the lesson is fresh, and if you already have microscopy images and a Python environment you control. Skip it if you need a dependency manifest, an importable module, a stable API or documented sample data, because none of those ship here and the last push was on 2026-04-21 with no tagged releases to fall back on.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 6 months ago.
What is it written in?
Mainly Jupyter Notebook, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • bnsreenu/python_for_microscopists4,426 ★ · +10
Star history
Repository2026-09-232026-11-15
bnsreenu/python_for_microscopists4.4k4.4k

10 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The file number is the only table of contents

There is no package here, no module to import, no index page. The organizing idea is a number prefix on each file, and the number encodes when the lesson runs. 017-Reading_Images_in_Python.py opens before 018-image_processing_in_pillow.py, which opens before 019-image_processing_in_scipy.py. Around 031 the numbering turns to CSV files and grain analysis, then from 036-data_analysis_using_Pandas_Intro_data_loading.py onward to Pandas data handling and plotting.

That scheme has one real strength and one real cost. The strength is that a learner can tell at a glance where a topic sits in the arc, and can see what came immediately before. The cost is that a file name tells you the lesson number but never tells you what the script needs. Nothing in the listing names a dependency manifest, so the reader assembles the environment by watching the instructor install packages in a video.

One library per file, so the same task gets solved repeatedly

The middle of the folder runs the same job through a series of libraries in turn. Pillow at 018, scipy at 019, scikit-image at 020, then OpenCV spread across a run of files covering preprocessing and thresholding, followed by keypoint detectors and descriptors and a homography registration script.

Doing segmentation five times looks wasteful if you came for one technique. Read as instruction, it is the point: each file changes one variable, so the learner can attribute a difference in output to the library rather than to the pipeline. The trade shows up later. 033-grain_size_analysis_using_wateshed_segmentation.py and 035-Cell Nuclei analysis using watershed.py both walk the watershed route, and the comparison has to be reconstructed by the reader because no file states which one supersedes the other.

Cloning master and opening 017 is the entire first run

The README gives no install command, no clone command and no environment file. It points instead at the DigitalSreeni YouTube channel and states that the code supports the tutorials there, so the working instructions live in the videos rather than in the repository. That means there is nothing to paste into a terminal before you start, and it also means the first lesson has to come from the lesson.

Practically, you clone the default branch named master, open 017-Reading_Images_in_Python.py in an editor or Jupyter, and follow along with the corresponding video. The environment is whatever the video installs. Because the file names carry no dependency list and the README does not say where the image data comes from, a broken first run usually means a missing package or a path that points at data on the instructor's machine rather than yours.

The documentation is an APA citation guide, not a setup guide

What the README does document is how to credit the work. It gives the APA form for a video, with an example citation for a Detectron2 fine-tuning lesson, and it offers a repository citation format with the example line naming 330_Detectron2_Instance_3D_EM_Platelet.ipynb. Versioning rests on commit history rather than tagged builds, because the repository has no GitHub releases.

Those citations are worth having in a field where reuse gets written up in papers. They are not a substitute for setup documentation. The language statistics record Jupyter Notebook as the primary language, and the example points at a .ipynb file, yet the visible top-level entries are mostly .py scripts run one at a time. Expect .py scripts in the early numbered lessons, and notebooks such as the cited 330 file later on.

Duplicate names and packed ranges break the numbering scheme

The numbering is not consistent enough to serve as a lookup. Two files in the OpenCV run carry the same lesson name, 025-image_processing_in_openCV_intro1-preprocessing.py and 026-image_processing_in_openCV_intro1-preprocessing.py, so the prefix is the only way to tell them apart. Elsewhere a single entry covers a whole lesson block: 062-066-ML_06_04_TRAIN_ML_segmentation_All_filters_RForest.py packs several lesson numbers into one file name, which means a reader searching for a lesson in the middle of that block finds nothing carrying that number.

There is a matching split in the grain analysis work, where 033 covers watershed grain sizing, 034a extends it to multiple files and 034b rewrites the same job around functions. Two implementations of one step means a reader cannot tell from the file names which is the intended shape, and no file states the answer.

Training and prediction live in separate files with no shared state

The machine learning section follows the usual split. 060-RandomForest1.py and 061-Gabor_Filter_Banks.py set up the features, 062-066 handles training on all filters with a random forest, and 067-ML_06_05_PREDICT_ML_segmentation_All_filters_RForest.py does the predicting step. Training and prediction are separate scripts.

Scripts written for a camera-facing video lesson trade reproducibility for legibility, and the difference only bites when you try to reproduce a number.

Where this differs from documentation-first image analysis courses

The usual alternative is a library's own documentation set, where scikit-image and OpenCV ship written guides with example data and a defined API. The difference in approach is the anchor. Those courses are anchored to a versioned API and ship sample images with the text; this repository is anchored to a video timeline and assumes data you already have.

That anchor decides who benefits. A reader who already handles microscopy data and wants a worked example of gabor filter banks or GMM segmentation gets more here than from an API reference. A reader who needs a documented input contract, a version pinning strategy or sample data gets less, because the tutorial index is a YouTube channel and the environment arrives by demonstration.

Editorial conclusion

Adopt this repository if you are working through the DigitalSreeni videos and want the exact files the instructor typed while the lesson is fresh, and if you already have microscopy images and a Python environment you control. Skip it if you need a dependency manifest, an importable module, a stable API or documented sample data, because none of those ship here and the last push was on 2026-04-21 with no tagged releases to fall back on. Verify one thing first: open 017-Reading_Images_in_Python.py, run it against a single image of your own, and confirm that the packages it imports are installed and that the path it opens matches where your data sits.

Frequently asked questions

What is python_for_microscopists used for?

It holds the supporting code for the DigitalSreeni YouTube channel, a Python course whose emphasis is image processing and later machine learning and deep learning work. The files back individual lessons rather than forming a library.

How do I install python_for_microscopists?

The README gives no install command and the repository carries no dependency manifest. The default branch is master, and the README points to the DigitalSreeni videos the code supports.

Is python_for_microscopists a Python package I can pip install?

No. The top level holds numbered .py files such as 017-Reading_Images_in_Python.py and 018-image_processing_in_pillow.py, run individually rather than imported as a module.

What licence and citation terms apply to python_for_microscopists?

The repository is under the MIT licence. The README gives APA citation forms for both the videos and the code, with an example citing a Detectron2 lesson and a repository file.

How do I cite python_for_microscopists?

The README offers Author's Last Name, First Initial. (Year). Title of Repository. GitHub. URL as the repository form, and a separate APA form for citing a YouTube video by upload date and URL.

Official sources

  1. bnsreenu/python_for_microscopists on GitHub
  2. Issues
  3. License: MIT
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/bnsreenu-python-for-microscopists.svg)](https://hysenlabs.com/projects/bnsreenu-python-for-microscopists)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/bnsreenu-python-for-microscopists.svg)](https://hysenlabs.com/projects/bnsreenu-python-for-microscopists)

Was this useful?