-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
Description
Holle . The automatic annotation function malfunctions after integrating label-studio-ml-backend and segment_anything_model.
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
3、Configured in Settings -> Labeling Interface
(Only BrushLabels supported?)
<View>
<Image name="image" value="$image" zoom="true"/>
<BrushLabels name="tag" toName="image">
<Label value="Airplane" background="rgba(255, 0, 0, 0.7)"/>
<Label value="Car" background="rgba(0, 0, 255, 0.7)"/>
</BrushLabels>
</View>
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.)
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.