samexporter icon indicating copy to clipboard operation
samexporter copied to clipboard

Does the exported SAM2 encoder and decoder only support inference images?

Open Aimol-l opened this issue 1 year ago • 4 comments
trafficstars

I plan to conduct video inference, but it seems that having only encoder and decoder is not enough. Perhaps it includes:Image encoder,Memory attention. Prompt encoder and mask decoder,Memory encoder,Memory bank.

屏幕截图_20240802_152457

I'm a bit confused.😕

Aimol-l avatar Aug 02 '24 07:08 Aimol-l

Hi @Aimol-l , There is no inference code at the moment. Please use the official repo from Meta. Thank you!

vietanhdev avatar Aug 02 '24 16:08 vietanhdev

我打算做视频推理,但是好像只有encoder和decoder还不够, 可能还要包括:Imagecoder,Memory Attention,Prompt Encoder和Mask Decoder,Memory Encoder,Memory Bank。

在我们_20240802_152457

我有点困惑。😕

I also want to use it for video inference. Does the exported SAM2 encoder and decoder support it?

MELANCHOLY828 avatar Aug 16 '24 06:08 MELANCHOLY828

我打算做视频推理,但是好像只有encoder和decoder还不够, 可能还要包括:Imagecoder,Memory Attention,Prompt Encoder和Mask Decoder,Memory Encoder,Memory Bank。 在我们_20240802_152457 我有点困惑。😕

I also want to use it for video inference. Does the exported SAM2 encoder and decoder support it?

I am try to export Memory_attention module,but failed. this is my code :https://github.com/Aimol-l/SAM2Export.git so,I'm stuck。 this is my note graph. 屏幕截图_20240816_141328

Aimol-l avatar Aug 16 '24 06:08 Aimol-l

我打算做视频推理,但是好像只有encoder和decoder还不够, 可能还要包括:Imagecoder,Memory Attention,Prompt Encoder和Mask Decoder,Memory Encoder,Memory Bank。 在我们_20240802_152457 我有点困惑。😕

I also want to use it for video inference. Does the exported SAM2 encoder and decoder support it?

I am try to export Memory_attention module,but failed. this is my code :https://github.com/Aimol-l/SAM2Export.git so,I'm stuck。 this is my note graph. 屏幕截图_20240816_141328

你好,请问图片预测的运行成功了吗,我报错 Traceback (most recent call last): File "", line 5, in File "e:\anaconda\envs\sam2\lib\site-packages\imread_from_url\imread_from_url.py", line 52, in imread_from_url image = cv2.cvtColor(np.array(image, dtype=np.uint8), cv2.COLOR_RGB2BGR) cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'cvtColor'

Overload resolution failed:

  • src is not a numpy array, neither a scalar
  • Expected Ptrcv::UMat for argument 'src' 不知道是不是版本问题

MELANCHOLY828 avatar Aug 16 '24 10:08 MELANCHOLY828