Skip to content

Trouble using segment_anything_2_image in Label Studio #825

@mxochicale

Description

@mxochicale

Hi HumanSignal team

First off, I really appreciate the open-source version of Label Studio. Amazing work!

Unfortunately, I haven’t been able to get SAM2 for image segmentation working, even after following the steps from your guide here:
🔗 segment_anything_2_image example

My implementation is available here:
👉 https://github.com/mxochicale/labelstudio

I thought the problem might be related to:

  • LABEL_STUDIO_URL and LABEL_STUDIO_API_KEY, but fixing those didn’t help
  • I also tried adding showInline="true" to the labeling configuration
  • The ML backend logs look fine (though I’m not sure if I’m missing something):
ml-backend  | [2025-10-25 00:14:03,387] [DEBUG] [hydra.core.utils::set::279] Setting JobRuntime:name=UNKNOWN_NAME
ml-backend  | [2025-10-25 00:14:03,387] [DEBUG] [hydra.core.utils::set::279] Setting JobRuntime:name=app
ml-backend  | [2025-10-25 00:14:05,293] [INFO] [root::_load_checkpoint::174] Loaded checkpoint sucessfully
ml-backend  | [2025-10-25 00:14:10,488] [DEBUG] [label_studio_ml.api::log_request_info::185] Request headers: Host: localhost:9090
ml-backend  | User-Agent: curl/7.81.0
ml-backend  | Accept: */*
ml-backend  | 
ml-backend  | 
ml-backend  | [2025-10-25 00:14:10,488] [DEBUG] [label_studio_ml.api::log_request_info::186] Request body: b''
ml-backend  | [2025-10-25 00:14:10,489] [DEBUG] [label_studio_ml.api::log_response_info::191] Response status: 200 OK
ml-backend  | [2025-10-25 00:14:10,489] [DEBUG] [label_studio_ml.api::log_response_info::192] Response headers: Content-Type: application/json
ml-backend  | Content-Length: 41
ml-backend  | 
ml-backend  | 
ml-backend  | [2025-10-25 00:14:10,489] [DEBUG] [label_studio_ml.api::log_response_info::193] Response body: b'{"model_class":"NewModel","status":"UP"}\n'

Here’s what I see in the UI:

Image

Do you have any recommendations or know what I might be missing?
Thanks a lot for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions