Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Mobile SAM #1555

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Implement Mobile SAM #1555

wants to merge 8 commits into from

Conversation

yuki399
Copy link

@yuki399 yuki399 commented Sep 18, 2024

@kyakuno
Copy link
Collaborator

kyakuno commented Dec 31, 2024

モデルアップロード済み。
https://storage.googleapis.com/ailia-models/mobile_sam/mobile_sam.onnx

@kyakuno
Copy link
Collaborator

kyakuno commented Jan 1, 2025

ailiaで下記のエラーになる。

ailia.core.AiliaInvalidLayerException: code: -10 (Incorrect layer parameter. [broken or unsupported AI model file])
+ error detail : Layer:/OneHot_output_0(OneHot) Error:expect 1 element in depth LegacyFP32Tensor

@kyakuno
Copy link
Collaborator

kyakuno commented Jan 1, 2025

python3 mobile_sam.py --onnx
だと推論できる。

@kyakuno
Copy link
Collaborator

kyakuno commented Jan 21, 2025

Apache-2.0 license

@kyakuno
Copy link
Collaborator

kyakuno commented Jan 21, 2025

ailia SDK 1.6のベータ版で動作を確認。

@kyakuno
Copy link
Collaborator

kyakuno commented Jan 21, 2025

kyakuno@mbakk mobile_sam % python3 mobile_sam.py -b -e 1
 INFO arg_utils.py (13) : Start!
 INFO arg_utils.py (163) : env_id: 1
 INFO arg_utils.py (166) : CPU-AppleAccelerate
 INFO model_utils.py (89) : ONNX file and Prototxt file are prepared!
 INFO model_utils.py (89) : ONNX file and Prototxt file are prepared!
 INFO mobile_sam.py (119) : Positive coordinate: None
 INFO mobile_sam.py (120) : Negative coordinate: None
 INFO mobile_sam.py (125) : Start inference...
 INFO mobile_sam.py (147) : BENCHMARK mode
 INFO mobile_sam.py (171) : 	ailia processing estimation time 30 ms
 INFO mobile_sam.py (171) : 	ailia processing estimation time 18 ms
 INFO mobile_sam.py (175) : 	average time estimation 4.5 ms
 INFO mobile_sam.py (171) : 	ailia processing estimation time 18 ms
 INFO mobile_sam.py (175) : 	average time estimation 9.0 ms
 INFO mobile_sam.py (171) : 	ailia processing estimation time 17 ms
 INFO mobile_sam.py (175) : 	average time estimation 13.25 ms
 INFO mobile_sam.py (171) : 	ailia processing estimation time 18 ms
 INFO mobile_sam.py (175) : 	average time estimation 17.75 ms
 INFO mobile_sam.py (200) : saved at : output.png

# Conflicts:
#	scripts/download_all_models.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants