HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
18.44k stars 2.32k forks source link

extremely ambiguous error when attempting Labeling #2295

Open mutantbob opened 2 years ago

mutantbob commented 2 years ago

I am attempting to import a list of images to eventually label with bounding boxes .

When I "Add URL" http://172.17.0.1:8252/label-studio in the Data Import tab it seems to succeed. It shows me "upload/3/02d5eab1-label-studio" with a green bar next to it. I can rig the Labeling Setup for rectangles and replace the Airplane/ Cars tag with my own.

After I "Save", I get the project screen. When I click on the row with ID 1 I get

There was an issue loading URL from $image value

Things to look out for:

    URL is valid
    URL scheme matches the service scheme, i.e. https and https
    The static server has wide-open CORS, [more on that here](https://labelstud.io/guide/storage.html#Troubleshoot-CORS-and-access-problems)

Technical description:
URL: [/data/upload/3/02d5eab1-label-studio](http://localhost:8080/data/upload/3/02d5eab1-label-studio)

The contents of the URL I provided during Data Import looks like

http://172.17.0.1:8252/picture?timestamp=1651477507409
http://172.17.0.1:8252/picture?timestamp=1651481144842
http://172.17.0.1:8252/picture?timestamp=1651484783365
http://172.17.0.1:8252/picture?timestamp=1651488423892
http://172.17.0.1:8252/picture?timestamp=1651492064726
http://172.17.0.1:8252/picture?timestamp=1651495704734
http://172.17.0.1:8252/picture?timestamp=1651499343520

And if I download one of those images inside Label Studio's docker container I get

root@c455c38143c6:/label-studio# wget --server-response -O /dev/null http://172.17.0.1:8252/picture?timestamp=1651499343520
--2022-05-02 17:33:13--  http://172.17.0.1:8252/picture?timestamp=1651499343520
Connecting to 172.17.0.1:8252... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Access-Control-Allow-Origin: *
  Date: Mon, 02 May 2022 17:33:13 GMT
  Server: Apache-HttpCore/5.0-beta2 (Java/11.0.11)
  Content-Length: 30768
  Content-Type: image/jpeg
  Connection: keep-alive
Length: 30768 (30K) [image/jpeg]
Saving to: '/dev/null'

/dev/null           100%[===================>]  30.05K  --.-KB/s    in 0s      

2022-05-02 17:33:13 (1.05 GB/s) - '/dev/null' saved [30768/30768]

So I think the CORS should not be a problem (Access-Control-Allow-Origin: *)

Describe the solution you'd like It would be nice if the error message could explain the specific issue and maybe give me the value of $image so I can troubleshoot this further.

makseq commented 2 years ago

Your input URL http://172.17.0.1:8252/label-studio must have .txt extension: http://172.17.0.1:8252/label-studio.txt. Re-save it as a txt file and try re-import it again. Also it's better to have .jpg extensions for images.

mutantbob commented 2 years ago

I altered the CGI path to be http://172.17.0.1:8252/label-studio.txt and the image URLs within to be

http://localhost:8252/picture.jpg?timestamp=1650596658817
http://localhost:8252/picture.jpg?timestamp=1650600295853
http://localhost:8252/picture.jpg?timestamp=1650603933326
http://localhost:8252/picture.jpg?timestamp=1650607568998
http://localhost:8252/picture.jpg?timestamp=1650611207440
http://localhost:8252/picture.jpg?timestamp=1650614845616
http://localhost:8252/picture.jpg?timestamp=1650618481760

but I am still getting the There was an issue loading URL from $image value error.

makseq commented 2 years ago

yes, I see now, it's a bug. TXT and CSV are not recognized if they come from URL. Only .json is supported in this way.