I have thousands of JPEG images in the Azure cloud. I linked them to Label Studio as a Source Storage, I turned the option "Treat every bucket object as a source file" for that. I can see all my images in Label Studio.
Here is the source for task 80960 when I click on "show task source" :
{
"id": 80960,
"data": {
"image": "https://xxx.blob.core.windows.net/container/folder/im-1.jpg?se=2021-04-07T09%3A45%3A08Z&sp=rt&sv=2020-06-12&sr=b&sig=L56aMlD21DwfSFxBYFdmvz%2DqBMdUHX2%2BYoMjeHio%2BzI%3D"
},
"annotations": [],
"predictions": []
}
Now I want to upload predictions (stored locally) but I don't know what to put in the "data" field.
My question is : how should I import my predictions ? Should I upload a JSON in the Basic Label Studio JSON format with the data field matching exactly this URL ? That's what I tried to do :
curl -X GET http://xxx.com/api/projects/1/tasks/
To get all the URLs of the image field in data.
It returns a list of these objects
{
"id": 80960,
"data": {
"image": "azure-blob://container/folder/im-1.jpg"
},
"meta": {},
"created_at": "2021-04-08T18:10:57.993767Z",
"updated_at": "2021-04-08T18:10:57.993795Z",
"is_labeled": false,
"overlap": 1,
"project": 1,
"file_upload": null,
"annotations": []
}
I tried to upload a JSON with azure-blob://container/dir/im-1.jpg as the URL like this :
[
{
"data": {
"image": "azure-blob://container/dir/im-1.jpg"
},
"predictions": [
{
"result": [
{"from_name": "...",}
]
}
]
}
]
but it doesn't work. It creates a new task with the raw azure-blob:// URL that can't connect to the cloud :
Cannot load image (azure-blob://container/dir/im-1.jpg). Check console/network panel for more info.
We have implemented predictions import from storages recently and it isn't included into release 1.0.1 yet. So, you have 2 tracks to solve it:
For (2) you need to save json files into your storage using the LS common format.
Thanks, #767 worked perfectly !