HumanSignal / HumanSignal/label-studio

The automatic annotation function malfunctions after integrating label-studio-ml-backend and segment_anything_model.

Open
#8,855 1 comment 0 reactions 0 assignees View on GitHub
community_docs
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

Holle . The automatic annotation function malfunctions after integrating label-studio-ml-backend and segment_anything_model.


Image

1、Deployed label-studio-ml-backend and segment_anything_model

```
services:
segment_anything_model:
container_name: segment_anything_model
image: heartexlabs/label-studio-ml-backend:sam-master
init: true
build:
context: .
shm_size: '4gb'
args:
TEST_ENV: ${TEST_ENV}
deploy:
resources:
limits:
memory: 8G
reservations:
memory: 4G
# Add this to pass through 1 GPU
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
environment:
# specify these parameters if you want to use basic auth for the model server
- BASIC_AUTH_USER=
- BASIC_AUTH_PASS=
# Change this to your model name: MobileSAM or SAM
- SAM_CHOICE=MobileSAM
- LOG_LEVEL=DEBUG
# Enable this to use the GPU
- NVIDIA_VISIBLE_DEVICES=all
# specify the number of workers and threads for the model server
- WORKERS=1
- THREADS=8
# specify the model directory (likely you don't need to change this)
- MODEL_DIR=/data/models

# Specify the Label Studio URL and API key to access
# uploaded, local storage and cloud storage files.
# Do not use 'localhost' as it does not work within Docker containers.
# Use prefix 'http://' or 'https://' for the URL always.
# Determine the actual IP using 'ifconfig' (Linux/Mac) or 'ipconfig' (Windows).
- LABEL_STUDIO_HOST=http://10.20.16.79:35001/
- LABEL_STUDIO_ACCESS_TOKEN=0e3428a1c8403eae227fbb75df7101957f5e5c38

ports:
- 35002:9090
volumes:
- "./data/server:/data"

```

2、Configured in Settings -> Model, with the status shown as Connected

Image

3、Configured in Settings -> Labeling Interface
(Only BrushLabels supported?)

```





```

4、During annotation, no automatic segmentation occurs.(When clicking and brushing on the image, the label-studio-ml-backend does not print logs, nor does it receive any requests?)(When clicking on the task, the label-studio-ml-backend prints logs as expected.)

Image

label-studio docker-compose.yml

```
services:
sti-label-studio:
stdin_open: true
tty: true
image: heartexlabs/label-studio:latest
restart: unless-stopped
expose:
- "8000"
ports:
- "35001:8000"
environment:
- DJANGO_DB=default
- POSTGRE_NAME=${POSTGRE_NAME}
- POSTGRE_USER=${POSTGRE_USER}
- POSTGRE_PASSWORD=${POSTGRE_PASSWORD}
- POSTGRE_PORT=${POSTGRE_PORT}
- POSTGRE_HOST=${POSTGRE_HOST}
- LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST:-}

- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_STORAGE_BUCKET_NAME=${AWS_STORAGE_BUCKET_NAME}
- AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL}
- AWS_S3_REGION_NAME=${AWS_S3_REGION_NAME}
- AWS_DEFAULT_ACL=${AWS_DEFAULT_ACL}
- USE_S3_STORAGE=${USE_S3_STORAGE}

- STORAGE_TYPE=${STORAGE_TYPE}
- STORAGE_AWS_ACCESS_KEY_ID=${STORAGE_AWS_ACCESS_KEY_ID}
- STORAGE_AWS_SECRET_ACCESS_KEY=${STORAGE_AWS_SECRET_ACCESS_KEY}
- STORAGE_AWS_BUCKET_NAME=${STORAGE_AWS_BUCKET_NAME}
- STORAGE_AWS_FOLDER=${STORAGE_AWS_FOLDER}
- STORAGE_AWS_REGION_NAME=${STORAGE_AWS_REGION_NAME}
- STORAGE_AWS_ENDPOINT_URL=${STORAGE_AWS_ENDPOINT_URL}
- STORAGE_AWS_OBJECT_PARAMETERS=${STORAGE_AWS_OBJECT_PARAMETERS}

- JSON_LOG=1
# - LOG_LEVEL=DEBUG
volumes:
- /data/sti/label-studio/data:/label-studio/data:rw
command: label-studio-uwsgi

```
Thanks a lot, looking forward to hearing from you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.