Closed woailunhua closed 1 year ago
I found that SAMM works well on Windows. My host is a dual system, and the hardware resources have not changed.But why is there such a bug under Linux?
It's interesting to know it works better on Windows than Linux for you. Our testing and development are mainly done on Linux. The support for Windows was actually a secondary priority. Not sure what happened, but I will try to use your data later when I find some more time.
I am suspecting a Numpy.mmap issue.
Just a sanity check: by any chance you installed the newest version of the repository on Windows, but not on Linux?
Thanks for your reply.I reinstalled the latest SAMM version on Linux, but the problem persists. Are you testing on Linux that the data I provided is working?
I tired your data on multiple versions and OS's, they all worked fine.
Could you share the information of your hardware? Also, could you also try to re-install SAMM (both the Slicer extension and sam_server).
I am getting the same issue on macOS 12.6.5, 3D Slicer 5.2.2 and version 1.0.3 of SAMM. I'm running without a GPU on a 2.9GHz Intel i5 with 16GB RAM. I load a 2D slice into Slicer, choose the volume in Samm Base and compute embedding. I then select 3 prompts on the image and no segmentation is generated. After reloading the Samm Base module, I do the same procedure and get the following error in 3D Slicer's Python terminal:
Traceback (most recent call last): File "/Users/my_user/GitHub/samm/samm/SammBase/SammBaseLib/LogicSamm.py", line 209, in processStartMaskSync memmap = numpy.memmap(self._parameterNode._workspace + '/mask.memmap', \ File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/numpy/core/memmap.py", line 267, in new mm = mmap.mmap(fid.fileno(), bytes, access=acc, offset=start) ValueError: mmap length is greater than file size
It's hard to reproduce the error on my side. Would you be interested in a Zoom meeting? Shoot me an email at yliu333@jhu.edu @rjkowalski @woailunhua
@bingogome - I just got this setup on a new 14" MacBook Pro with an Apple M2 Pro. MPS was detected as expected when running the SAM Server. It only took about 60 seconds to compute embedding for one 3D volume with 40 slices. As soon as this completed, I clicked on Start Mask Sync and received the same error:
Traceback (most recent call last): File "/Users/my_user/GitHub/samm/samm/SammBase/SammBaseLib/WidgetSammBase.py", line 141, in onPushStartMaskSync self.logic.processStartMaskSync() File "/Users/my_user/GitHub/samm/samm/SammBase/SammBaseLib/LogicSamm.py", line 209, in processStartMaskSync memmap = numpy.memmap(self._parameterNode._workspace + '/mask.memmap', \ File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/numpy/core/memmap.py", line 267, in new mm = mmap.mmap(fid.fileno(), bytes, access=acc, offset=start) ValueError: mmap length is greater than file size
Marking this as a [bug] entry. Looks like it is MacOS specific.
Also getting it on Ubuntu 18.04 3D Slicer 5.1.0
This issue should be fixed now in 5b63c7dfa120c39066215fb766f8b246be3e2414 by switching communication from memory mapping to ZMQ. I am closing this issue because MacOS would be challenging to fit the large model here, but I will add a support for the smaller model SAM provided.
Sorry to reply to you so late, here are two of my data, you can try to split the teeth or maxillary sinuses.
My environment is Linux and my GPU is 2080TI.My 3dslicer version is 5.2.2. SAMM running on my side The error message is:"ValueError: mmap length is greater than file size.".