QuPath ver.5 using up 100% CPU when doing simple annotations on slides

I have been using version/milestone 4 and now 5 and this issue has recently arisen when using both versions: the app suddenly starts to ramp up to 100% CPU usage, which lasts for a few minutes. This results in the app becoming unresponsive. The CPU usage eventually falls back to normal levels and the app becomes responsive again until the same thing happens again and again.
I have uninstalled and reinstalled the app. I’ve made all the files local (downloaded them to my computer instead of a remote server) and the issue still remains. I’m not doing anything particularly complex - simple marking white areas on a slide using the Wand Tool. The file sizes of the slide are rather large, ~0.5GB.
Other apps are running normally. Memory usage remains constant, and so does disk space. The app simply glitches every 5 minutes and then ‘un-glitches’, and then glitches, and round and round we go.

I would need more details to be able to diagnose the problem.

  • Does it happen immediately, or only after you have annotated for a while?
  • Approximately how many annotations are on the slide when it happens? Have you also run cell detection or any other commands?
  • How large is the image in pixels? This is shown under the ‘Image’ tab; it’s not clear to me if 0.5 GB is the compressed or uncompressed file size.
  • Do the issues occur with all version of QuPath you have tried, or only v0.2.0-m4/5?
  • What are the specifications of your computer (processor, RAM)?

If you are able to provide a screenshot when this occurs (ideally with the ‘Image’ tab shown, or alternatively the ‘Hierarchy’ tab) then I could see the answers to some of my own questions.

In general, QuPath uses vector annotations and determines relationships between these as they are drawn. This can be computationally expensive, particularly if you have a large number of (unlocked) annotations with many vertices that you are adjusting interactively. My expectations are that the glitches occur when QuPath is trying to resolve these relationships.

However, there are often other ways to achieve what you want, e.g. by locking annotations, using detections instead of annotations, using fewer annotations, simplifying annotations to reduce numbers of vertices, or switching to the pixel classifier rather than annotations at all. I can’t really advise anything without knowing exactly what you want to achieve.

Changing QuPath’s method of annotation would be a big task that would result in losing or changing useful features. If the current behavior doesn’t work for you, it might be that you need to find some raster-based annotation software to get much better performance - QuPath does not (currently at least) support this. See here for a discussion.

If you haven’t read them already, the following links may also help describe what is happening:

1 Like

*Pete beat me to it.

If you are looking for white spaces within a tissue, I recommend using Simple tissue detection and the create simple threshold tool.

Using add shape measurements, area, I can then look at the objects color coded by size.

Do make sure you have an annotation selected when you hit Run!!! It will probably take a long time to run on the whole image :slight_smile:

Hi Pete,

Thank you for your reply.

The glitching starts after making a few annotations. All I’m trying to do is mark the empty white spaces within the tissue analysis and also particular features e.g. polyps, fat tissues. There are ~800 annotations per image. I’ve tried making large annotations instead of many smaller ones and that hasn’t made any difference to the glitching.

The project I’m working on consists of six images in total and the average size in pixels is 6GB (uncompressed), the .svs files are 0.5GB.
I’ve done the same analysis using v0.2.0-m4 on different images (but same tissue and size) with no issues but the glitching started recently. I upgraded to v0.2.0-m5 and the issues remained.
I’m using the Dell Latitude 7480, Intel Core i7-7600U 2.8 GHz, 8 GB RAM, 256 GB SSD. Other programmes are running fine and I’ve had someone in IT look over my computer to see if the issues are caused by the hardware and they’ve not found anything to suggest that the computer is faulty.


By ‘a few’ do you mean about three, or do you mean something closer to the 800 annotations?

I understand from this that the glitching started recently when using m4, but didn’t previously happen with m4… and persisted when you moved to m5. Since it only started to occur with m4 more recently, but m4 itself didn’t change, I guess something else must have changed - either in your annotation strategy or on your computer.

My guess is that it was something to do with the annotations because I still expect the issue is that QuPath is too slow when resolving the object hierarchy with that many separate annotations. I am making some changes in this regard, so you might see improvements in m6… but because I don’t know exactly what the issue is or when it occurs, I can’t say for sure.

In any case, I’m aware that this is an area that requires some improvement but there is no easy solution; with m5 you may need to explore different approaches to annotating to see if you can get it working more smoothly.

v0.2.0-m6 might help with this (I’d recommend duplicating your project though, in case you want to go back).

I haven’t tested it for very long, but with m6 I could draw on an image with almost 20,000 annotations on my laptop and performance was fine. Don’t think that would have worked in m5.

1 Like

Hi, I’ve run this tool and it’s worked rather well. But I don’t understand what each of these parameters mean and why they are given these values. Could you explain what they mean? Thanks.

More information on Simple tissue detection here:

I don’t think I have a guide for the Simple thresholding tool. I would mostly recommend playing with the settings, as you can see the results once you choose a class in the Above or Below threshold. Values will depend too much on what you want to accomplish and the nature of your image/tissue.

Create Objects once you are happy with how the color mask looks.

Looks like this is as close as I got.