Qupath on Apple silicon ARM M1

Hi, I’ve had a go at runing Qupath on the new M1 processors, unfortunately its generating physical memory errors. (ERROR: QuPath exception: Physical memory usage is too high: physicalBytes (11348M) > maxPhysicalBytes (8192M))
I wonder if there is any sort of quick fix? Or is there likely to be a fix in the next Qupath release?
Thanks,
Alan

I’m afraid probably not, unless you can help get to the bottom of it :slight_smile:

I don’t have a new Mac to develop/test with, although plan to invest in one within the next few months (depending on when any even newer models appear / my old one totally gives up).

Do the errors occur with a totally new installation? Does it start at all, or give up without starting?

It should be possible to change the amount of memory on startup manually by editing the .cfg file – see FAQs — QuPath 0.2.3 documentation

If you try it, please let me know if it helps at all.

Hi Pete, yes willing to help any way I can!
Installation is fine, cell detection was good, when I tried pixel classification it ran into the error. The annotation areas were not huge so I suspect something fundemental is wrong with the memory handling?
I’ll try manually increasing the memory manually as suggested.
Let me know if there are more specific tests to carry out?
Cheers,
Alan

1 Like

From personal experience (and I think a post on the forum about openCV?) the pixel classifier completely ignores QuPath’s memory limits. That was my first thought when I saw the numbers in the initial post… and if openCV no longer reads the OS’ available memory correctly…

1 Like

Aaah… that does indeed sound to me like an OpenCV problem. Cell detection doesn’t require it, but pixel classification does.

The bad news is that OpenCV moves into ‘native library’ territory (outside Java), making it horrendous to try and debug. My guess is that it requires a special version of OpenCV to be built. I will do some googling and report back if I find anything relevant.

2 Likes

Hi, changing the amount of memory in the .cfg file seems to do the trick for me. My typical analysis (1x area) which I could do with 4GB RAM on my intel mac could be processed by increasing the RAM to 6GB on the M1 mac. Seems like it useable but room for optimisation? I didn’t have any problems using 8/8GB on the M1 either, in fact I could increase the annotation area by at least 4x at 8GB. Thanks for your help, Alan

1 Like