CVHub520 / X-AnyLabeling

Effortless data labeling with AI support from Segment Anything and other awesome models.
GNU General Public License v3.0
4.27k stars 484 forks source link

SAM-Adapter-PyTorch #225

Closed biyuefeng closed 10 months ago

biyuefeng commented 10 months ago

Hello, after using SAM-Adapter PyTorch for model fine-tuning, the resulting model cannot be used properly in X-Anylabeling after being converted to onnx. There are the following situations:

  1. No display after framing;
  2. After framing, a small red box will be displayed on the full screen.
CVHub520 commented 10 months ago

Hello, @biyuefeng:

There can be multiple causes for the issues you mentioned. For the steps and processes of converting SAM-Adapter from torch to onnx, you may refer to this project.

Best regards, CVHub

biyuefeng commented 10 months ago

I encountered the following error when exporting using the code you provided:

After modifying the SameExporter, the exported model still has the same issue. Is it because he doesn't support SAM Adapter PyTorch? If supported, how should we proceed specifically? Thank you!

人生海海海布里 @.***

 

------------------ 原始邮件 ------------------ 发件人: "CVHub520/X-AnyLabeling" @.>; 发送时间: 2024年1月22日(星期一) 上午9:33 @.>; @.**@.>; 主题: Re: [CVHub520/X-AnyLabeling] SAM-Adapter-PyTorch (Issue #225)

Hello, @biyuefeng:

There can be multiple causes for the issues you mentioned. For the steps and processes of converting SAM-Adapter from torch to onnx, you may refer to this project.

Best regards, CVHub

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

biyuefeng commented 10 months ago

Hello, I converted ONNX according to the method of this project, but after framing, I won't get any results.

人生海海海布里 @.***

 

------------------ 原始邮件 ------------------ 发件人: "CVHub520/X-AnyLabeling" @.>; 发送时间: 2024年1月22日(星期一) 上午9:33 @.>; @.**@.>; 主题: Re: [CVHub520/X-AnyLabeling] SAM-Adapter-PyTorch (Issue #225)

Hello, @biyuefeng:

There can be multiple causes for the issues you mentioned. For the steps and processes of converting SAM-Adapter from torch to onnx, you may refer to this project.

Best regards, CVHub

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

CVHub520 commented 10 months ago

In order to troubleshoot why you're not getting any results after framing, I recommend you use the Netron tool to check if the input/output nodes are consistent with the built-in model nodes provided by the X-AnyLabeling tool.

biyuefeng commented 10 months ago

Hello, the previous issue regarding SAM-Adapter has not been resolved. Exporting the model as onnx is not available.  An attachment has been added to the model.

If you have time, please help to investigate. Thank you! Thank you very much!

人生海海海布里 @.***

 

------------------ 原始邮件 ------------------ 发件人: "CVHub520/X-AnyLabeling" @.>; 发送时间: 2024年1月22日(星期一) 下午3:27 @.>; @.**@.>; 主题: Re: [CVHub520/X-AnyLabeling] SAM-Adapter-PyTorch (Issue #225)

In order to troubleshoot why you're not getting any results after framing, I recommend you use the Netron tool to check if the input/output nodes are consistent with the built-in model nodes provided by the X-AnyLabeling tool.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

从QQ邮箱发来的超大附件

model_epoch_best.pth (357.92M, 2024年02月22日 11:19 到期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?t=exs_ftn_download&k=2b623838573ac288a6b201671f61514e1a16080f090002584f5a5a0e004c5005035615005d54564c075b5d5d5803050451560b083975630c0d065d546604130e010a675a5c12174f1216503804&code=bb889aca

sam-med2d_b.decoder.onnx (15.70M, 无限期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?t=exs_ftn_download&k=7f303934c7fb36cef6e0006b4037001e4a445c05000e06521f080904071a0550000814020051021c05070856540f045757035d02662f3242535d1459035300556d52175003545d555742175b08594a310f&code=2094f721

sam-med2d_b.encoder.onnx (1.01G, 2024年02月22日 11:22 到期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?t=exs_ftn_download&k=2c3839611608be8da5e8003e4261011d194c0e02055105014c080e04014c0300530f14025205031f0409015452070507050a0807647933410055140c010501563e5a17040a025c56044a170e0a0f4b325c&code=a89ada32

CVHub520 commented 10 months ago

Thank you for your inquiry, and I understand your frustration regarding the issue with SAM-Adapter and model exporting. While we do provide tools and detailed use cases for reference, the deployment of specific models would require personal debugging. I would recommend you thoroughly examine the log for potentially beneficial information.