Calculating embedding, gui may be unresponsive.
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\gui.py", line 323, in
w = Window()
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\gui.py", line 148, in init
pixmap = self.load_image()
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\gui.py", line 208, in load_image
self.get_embeddings()
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, kwargs)
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\gui.py", line 315, in get_embeddings
self.embedding = medsam_model.image_encoder(
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, *kwargs)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(args, kwargs)
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\segment_anything\modeling\image_encoder.py", line 110, in forward
x = self.patch_embed(x)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, kwargs)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, *kwargs)
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\segment_anything\modeling\image_encoder.py", line 417, in forward
x = self.proj(x)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(args, kwargs)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\conv.py", line 458, in forward
return self._conv_forward(input, self.weight, self.bias)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\conv.py", line 454, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [768, 3, 16, 16], expected input[1, 4, 1024, 1024] to have 3 channels, but got 4 channels instead
Calculating embedding, gui may be unresponsive. Traceback (most recent call last): File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\gui.py", line 323, in
w = Window()
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\gui.py", line 148, in init
pixmap = self.load_image()
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\gui.py", line 208, in load_image
self.get_embeddings()
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, kwargs)
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\gui.py", line 315, in get_embeddings
self.embedding = medsam_model.image_encoder(
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, *kwargs)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(args, kwargs)
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\segment_anything\modeling\image_encoder.py", line 110, in forward
x = self.patch_embed(x)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, kwargs)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, *kwargs)
File "C:\Users\Administrator\Desktop\MedSAM-1.0.0\segment_anything\modeling\image_encoder.py", line 417, in forward
x = self.proj(x)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(args, kwargs)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\conv.py", line 458, in forward
return self._conv_forward(input, self.weight, self.bias)
File "E:\project\miniconda\envs\medsam\lib\site-packages\torch\nn\modules\conv.py", line 454, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [768, 3, 16, 16], expected input[1, 4, 1024, 1024] to have 3 channels, but got 4 channels instead
I try to segment the picture but failed