Is QuPath right for me?

Hi everyone,
I sincerely hope to be posting this correctly as I could not find a beginner’s category and find myself getting lost in Image.sc repeatedly. It takes getting used to I suppose.
Currently, I have joined a project in a working group that deals with endocrinology and reproductive medicine. A part of the project deals with whole slide scans of tissue samples stained in H&E.
If I understand QuPath’s mode of operation correctly, classifiers can be trained to automatically classify cells after (semi-)automatic detection based on measurements like nucleus size or size ratio, color intensity and so forth. Right now I am trying to evaluate whether QuPath is also capable of being trained to differentiate cells by features like “nucleus position” - which would require QuPath to be able to differentiate between basal and luminal sides in a previously detected cell. Basically, there is a catalogue of features that needs to be applied to cells and results in a classification (lacking a better term) according to a scoring system.

I understand that these tasks are non-trivial and would require a lot of hard work and scripting. My question here for now is: Is something like this possible at all? Would at be possible with QuPath? If QuPath-savvy users / developers could tell me whether this project could be handled with QuPath at all, of course I will put a lot of time and effort into learning everything required and sharing my experiences with the community. However, since this is a limited funds / time project, I would rather spend resources differently if you - as the experts here - think that this approach is not feasible.

I hope you get my meaning, English is not my primary language and sometimes it’s hard for me to express my thoughts when writing…

Input is greatly appreciated. Thank you very much!!

PS, QuPath seems like a terrific piece of work!

Thanks @leckermatz and great question :smiley:

It would be easier to judge if you can share an image, but from your description I agree it sounds like it would take a lot of hard work and scripting to do it with QuPath - and custom scripts, rather than just automating built-in steps.

The classifiers QuPath uses (typically random forests) don’t have access to coordinates as features - I don’t think they would use that information very well. However, if you can compute meaningful (and robust…) features then these can be added to objects in QuPath as measurements, and then become accessible to the classifiers.

So lots of the basics are taken care of by QuPath, and it’s designed to be something you can use to create completely custom methods of analysis.

I guess the most fundamental question is whether you need image analysis at all or if visual scoring is acceptable. For a limited dataset, it can take much longer to automate things than to ‘do them manually’ - and the result won’t necessarily be any better, since you’re left to contend with the limitations of the data and classifiers.

If you do need image analysis, then the next question is whether you’re working with whole slide images. If so, then your options for open source software are pretty limited (although you could check out Orbit as well). To use anything else, you’ll likely need to work on cropped/downsampled fields of view.

And, finally, if you do need image analysis and have enough time/resources/expertise then developing a spectacular AI-based method might be the best that’s currently possible. QuPath could help you do that, but it would also require a lot of work beyond QuPath.

The last option is the one I’d choose, but then image analysis is the main thing I do :slight_smile: My aim is to improve QuPath in conjunction with research projects that push beyond that it can currently do… so I don’t spend so much time myself working with what it can currently do :slight_smile:

For the perspective of someone using the software a lot, @Research_Associate has written a spectacular post here.

1 Like

Post not yet complete! I was locked out due to too many edits.

An image might be good to work with (if you are allowed to provide one), and there are a lot of tricks you could play around with to generate more features. I’ll probably add a section on generating features for a classifier at some point, will need to make a note to myself on that. QuPath really has a lot of options if you are willing to get creative.

A few things I was thinking about:
0.2.0m# has a distance transform that you could use to find the distance of the cell from the surface of the tissue annotation. Unfortunately it is manual only right now, so that would introduce at least one click-based step into all of your images unless you wrote your own distance transform.

In many epithelial cells, the orientation is similar to other cells nearby, and I have a few scripts laying around to measure the similarity of orientation of surrounding cells.

If the cells usually have their nuclei far off-center, you might be able to create a measurement that is the distance between the nucleus centroid and the cell centroid.

I have usually struggled with accurate nucleus detection in columnar cells in QuPath due to the lack of staining in the very large nuclei. I am not sure there is a very good solution to this, as other cells work just fine. No stain, no easy way to determine the outline of the nucleus. It is the kind of thing we can see right away as a nucleus, but convincing a program takes a lot of additional “features”… like the deep learning Pete mentioned.

1 Like

Hi leckermatz,

As previously stated, it’s rather hard to give an advice without having a look at your images with some manual annotations to illustrate what you are willing to solve.

You might be interested to consider our Cytomine software. It is developed since 2010. It’s another open-source software for whole-slide image analysis but with more collaborative features: it works through a web-based client, it provides tools for semantic annotations (e.g. labeling cells to manual visual scoring, and later to train a classification model for semi-automated scoring), and a few algorithms for object detection/classification. These algorithms are not based on explicit feature extraction. We have random forest based algorithms as well as deep learning based algorithms. These algorithms are far from being generic and do not solve all tasks. So we also have a flexible API and we use technologies that help algorithm developers to plug their own algorithms. The software can also be installed on a desktop computer (but then without collaborative features).

Please have a look here:
https://uliege.cytomine.org/
Demo server:
http://demo.cytomine.be/
username: jsnow
password: jsnow
A personal account can also be created upon request.
Please let me know if you upload some data.

Don’t hesitate to contact us,
Raphaël.

1 Like

Thank you very much everyone for getting back to my issue so incredibly fast! It was my daughter’s birthday yesterday so I couldn’t really sneak off to my computer…

Well, you all have given me a bit to think about and read up on. I’ll get the first scans on Friday morning, unfortunately I’ll just grab them and then I’m headed off to work for the weekend. It might be Tuesday or even Wednesday until I can get around to crop some interesting sections of the scan, annotate and post them.

Since the project is still evolving, specifications for detection might change along the path- but that is something that’s rather common in scientific projects, isn’t it.

From what you wrote, QuPath might be able to perform the tasks needed, so I’ll follow he breadcrumbs. Thanks @maree for pointing me to Cytomine, which I will check out also. Web-based client/server architecture sounds interesting in itself as collaboration might become the next big thing in this project.

Again, I’m stunned by your friendliness, eagerness to help and rapid speed in answering my stupid beginner’s question… As I am not a computer scientist myself I am extremely grateful.

I’ll keep you posted on my progress (or rather, I’ll probably keep pestering you with dim-witted questions :slight_smile: ), and I’ll upload a few sample images next week.

Thanks again!

2 Likes