-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows COCO Import Issue #6949
Comments
In the newly created json file this is an example of my image location "data": { [/data/local-files] - i assume this is the local directory where the .sqlite3 database is stored, so in my instance it is stored here I added my images in multiple locations to see if it works, so i added my images to the following locations: C:\Users\User\AppData\Local\label-studio\label-studio In label studio i can see that my project has all of the image files with the annotations, however the images are not displayed. There is no local storage setup in my project, because when i add local storage and point it to the directory where my 250 images are i have 250 items in my project with annotations but no images, and i also have 250 images with no annotations. Starting to pull my hair out with this. |
could you share the screen shot of your project settings page? not exactly the same but I was wondering it is possible you may forget to turn off the "Treat every bucket object as a source file" button when you try to load the pre-annotation json files as annotation tasks. |
I managed to get the import to work, but this was not a fun experience. This guide already assumes that you have project that was exported to COCO and you have the .json file and images from the export. Here is what i did step by step.
i changed it to look like this (removed the \images\ and used single forward slashes and called my new folder dataset1)
and i changed the following values, and if i didnt see the values i just added them
Storage Type = Local Files. I then saved this and click on the sync button, my images were synced and imported. I then clicked on import, and just added the new fixed.json file with the new image file paths, all of my images and previous annotations were successfully imported and i was able to continue labeling. this process broke my brain, and maybe this import /export issue needs to resolved in a future release. |
I really hope this approach helps someone else that is having the same issue |
Hello PatrickGold555, Thank you and that is correct approach. I'll see if we can have proper documentation for this Thank you,
|
So i have seen so many people having this issue and cant believe this hasn't been sorted out.
I installed LS on windows in my python env with pip, created a new project, labeled 500 images and exported the project and images as COCO.
I wanted to send this export to a mate to double check the labeling, but before i did i deleted my LS project and tried to import the project and this is where it all went south.
I can get the annotations to import, but there are no images
I followed the guides and posts here
https://labelstud.io/guide/storage.html#Local-storage
#2806
https://community.labelstud.io/t/how-do-i-upload-annotations-in-the-ms-coco-format-for-images/374
in my python env, i found the base.py file and made my environment changes there.
My first issue is when i try and create a local storage folder via the UI i get the following error
[ErrorDetail(string="Serving local files can be dangerous, so it's disabled by default. You can enable it with LOCAL_FILES_SERVING_ENABLED environment variable, please check docs: https://labelstud.io/guide/storage.html#Local-storage", code='invalid')]
So i run the following set LOCAL_FILES_SERVING_ENABLED=true and i am able to upload files, i then add Source Storage, select Local, and specify my path D:\data, i include images into the data folder and try Sync, but sync always fails.
Next, when i unzip my coco export, i run the json file thru the label-studio-converter, i then create a new project, import that new json script, and i can see that all of my annotations load, however the images are not being displayed (Which makes sense at this point because no images have actually been uploaded yet)
But looking at the new json file the location to my image is "/data/local-files/?d=\9_17329744121672838.png" what does this even mean where is /data/local-files/?d= specified?, i tried manually changing the image locations to absolute paths and this also doesn't work.
There was a post that i saw that stated you can set a working directory when you start LS but for the life of me i cannot get the imports to work.
This there maybe a guide somewhere that can assist with this?
This is such a frustrating problem to have.
The text was updated successfully, but these errors were encountered: