NielsRogge / Transformers-Tutorials

This repository contains demos I made with the Transformers library by HuggingFace.
MIT License
8.48k stars 1.33k forks source link

ValueError: Input boxes must be a list of list of list of floating points. #300

Closed HripsimeS closed 1 year ago

HripsimeS commented 1 year ago

@NielsRogge @grahamannett @FrancescoSaverioZuppichini

Hello. I tried to check your notebook for fine tune SAM on the breast dataset. https://github.com/NielsRogge/Transformers-Tutorials/blob/master/SAM/Fine_tune_SAM_(segment_anything)_on_a_custom_dataset.ipynb

The training went well, but the point when I need to do the inference to prepare image + box prompt for the model, I get the error on inputs saying that "Input boxes must be a list of list of list of floating points". Can you please let me know what is the issue and how to fix it. Thanks in advance!!

erros
NielsRogge commented 1 year ago

You probably need to do [[prompt]] instead of [prompt]

HripsimeS commented 1 year ago

@NielsRogge thanks a lot, it fixed the issue 🥇