# Finetuning options with SAM?

**URL:** <https://discuss.huggingface.co/t/finetuning-options-with-sam/37609>\
**Category:** Models\
**Created:** [April 24, 2023, 7:07pm UTC](https://discuss.huggingface.co/t/finetuning-options-with-sam/37609 "2023-04-24T19:07:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alzaia](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@alzaia](https://discuss.huggingface.co/u/alzaia)\
**Post date:** [April 24, 2023, 7:07pm UTC](https://discuss.huggingface.co/t/finetuning-options-with-sam/37609/1 "2023-04-24T19:07:39Z")

</div>

I guess a lot of people will be asking this in the next weeks. When can we expect support for fine-tuning the SAM models of HF on own our datasets? There are some resources online on this (e.g. [How To Fine-Tune Segment Anything](https://encord.com/blog/learn-how-to-fine-tune-the-segment-anything-model-sam/)) and it would be cool to have it also on HF.

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [April 25, 2023, 4:51pm UTC](https://discuss.huggingface.co/t/finetuning-options-with-sam/37609/2 "2023-04-25T16:51:44Z")

</div>

This is in the works, we will definitely add tutorials for this!

cc @ybelkada @ArthurZ

---

<div class="post-metadata">

**Author:** ![alzaia](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@alzaia](https://discuss.huggingface.co/u/alzaia)\
**Post date:** [May 5, 2023, 9:27pm UTC](https://discuss.huggingface.co/t/finetuning-options-with-sam/37609/3 "2023-05-05T21:27:54Z")

</div>

Hello there, any updates on this? Thank you guys for the great and very fast work being done to have these new SOTA models available on the hub, it’s really appreciated 🙏.

---

<div class="post-metadata">

**Author:** ![ybelkada](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ybelkada/32/24289_2.png) [@ybelkada](https://discuss.huggingface.co/u/ybelkada)\
**Post date:** [May 10, 2023, 4:01pm UTC](https://discuss.huggingface.co/t/finetuning-options-with-sam/37609/4 "2023-05-10T16:01:10Z")

</div>

Hi @alzaia

@nielsr just posted a tutorial for this! [https://twitter.com/NielsRogge/status/1655631771742920716?s=20](https://twitter.com/NielsRogge/status/1655631771742920716?s=20) please find it here to try it out! Thanks again!

> **[Transformers-Tutorials/SAM at master · NielsRogge/Transformers-Tutorials](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/SAM)**
>
> master/SAM

---

<div class="post-metadata">

**Author:** ![alzaia](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@alzaia](https://discuss.huggingface.co/u/alzaia)\
**Post date:** [May 11, 2023, 5:51pm UTC](https://discuss.huggingface.co/t/finetuning-options-with-sam/37609/5 "2023-05-11T17:51:22Z")

</div>

Yes I saw it yesterday. Thanks a lot for the amazing work, guys! The notebook focuses on using bounding boxes from the masks as prompts for the fine-tuning. I am wondering if the same process can be done directly by feeding the masks as prompts instead (the `input_labels` arg. of the SAM model)?
