Blood Scan Demonstrator

I’ve been working on a project to use stitched images from an openflexure microscope to scan blood smears (or potentially other fluids) similarly to other digitized review systems used in modern medical laboratories. It features differential counting and morphology review. It is a Django based web ui with a yolov8 trained model to identify white blood cells. I used the leaflet JavaScript package which is traditionally used for maps to display the blood smears.

My current limitations are the ability to create good stitched images and the resolution on the microscope. I currently have my microscope set up with a 0.85 NA 60x objective of dubious quality off of eBay. Having used other optical microscopes I feel that the numerical aperture is enough for the task but the light is the problem or some other optical factor I’m not considering. Using an oil objective would be tricky with the objective mounted at the bottom. Optical microscopes also give the impression of greater detail because of the ability to quickly scroll between different z levels (which could be replicated digitally).

Anyways here is a video of the program I will update the post with source code soon.

https://youtu.be/C0ZjZ9bO4JQ

Source code:

3 Likes

@Nico that looks cool. For your questions about scanning, tiling and resolution @JohemianKnapsody has been doing some work on tiling, measuring resolution and getting good z-focus and recording focus stacked scans. There is a thread on the tiling images Automated Slide Scanning and Tiling.

Oil immersion objectives seem to be usual for blood samples, whether the microscope is upright or inverted, it is not something that I have looked at myself. Post 6 from @david on this thread High-resolution, upside-down microscope for oil immersion has practical suggestions on oil immersion with inverted microscopes.

Yeah in my experience in the lab 50x oil is used for the majority of the analysis while 100x oil is used for when a confusing WBC is encountered or for red cell and platelet analysis. The numerical aperture on the 50x is only 0.9, but still gives high quality resolution. A 40x dry objective could also definetley be used as well for the majority of basic blood smear analysis. I suppose that’s the difference between $75 optics and $20000 optics.

Also I believe some tasks like red blood cell morphology are not limited by resolution, but by size in your field of view on a traditional microscope. So in the digital setting it doesn’t matter much what resolution you have because you have unlimited zoom.

Thanks for the reply. I’m excited for what @JohemianKnapsody creates with the tiling work, it looks very powerful and promising.

2 Likes

Hi Nico, thanks for sharing! Just wondering what specifically the issue is with producing stitched images? Is it that they’re not tiling, or the final image doesn’t have the consistent appearance needed?

Both. I was using open cv with python stitching class.

I first tried stitching all the images together normally by just feeding them all into the stitcher but that was far too slow. Then I tried stitching the images to each other in order one by one, but the images wouldn’t stitch into the corners. My best results were by stitching each x coordinate into a long picture then stitching all those images together. The problem with that is if any single image fails the entire stitching process breaks.

Also the image is not consistent because of some gain compensation I have on. I also turned down the confidence to very low so the stitches would be inaccurate (but be successful more often).