Importing label studio json and images

Hi,

I am importing dataset and labels other have sent me:
1.My local storage setup:
path=/Users/ziqiangzhu/Work/Research/label_studio/project-1-at-2024-09-09-18-00-25495975/images

  1. Path in json
        "data": {
            "image": "/data/local-files/?d=images/94107602-1.png"
        },
  1. the problem:

Your help will be appreciated

Hello,

I make some experiment with local storage with png images and annotation in json.

Everything works now. Probably my post will be helpful for you question (link).

I work on Linux and have a directory for Label Studio. I run a Docker container with Label Studio in this directory by command:

docker run -it -p 8080:8080 -v $(pwd)/mydata:/label-studio/data heartexlabs/label-studio:latest 

It mount my local directory mydata from Label studio’s directory into directory /label-studio/data inside my Label studio’s Docker container.
All paths below are located inside this Docker container.

I connect the local storage according to the documentation [link](https://label stud.io/guide/storage.html#Local-storage ) to place images in it that will be in our project.

In order to activate Local storage, we register additional environment variables in the mydata/.new file with environment variables for the Docker container link, launching Label Studio:

LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/label-studio/data/local_storage

Launching Label Studio with support for the new environment variables we have set:

docker run -it -p 8080:8080 --env-file $(pwd)/mydata/.env -v $(pwd)/mydata:/label-studio/data heartexlabs/label-studio:latest

I set my local storage path for storing source images as:

/label-studio/data/local_storage/source_data/scallop

I have image path in Labeling web UI like this:

"image": "/data/local-files/?d=source_data/scallop/Zone_1_35_3.png"

The full image path inside Docker container is:

/label-studio/data/local_storage/source_data/scallop/Zone_1_35_3.png

It seems to me that you have path to storing source images as:

/Users/ziqiangzhu/Work/Research/label_studio/project-1-at-2024-09-09-18-00-25495975/images

Probably you need to set path to your images like:

        "data": {
            "image": "/data/local-files/?d=94107602-1.png"
        },

Or probably you need to set path to storing source images as:

/Users/ziqiangzhu/Work/Research/label_studio/project-1-at-2024-09-09-18-00-25495975

to work with

"data": {
            "image": "/data/local-files/?d=images/94107602-1.png"
        },