Comments (6)
For anyone who stumble upon this in the future.
Given:
COCO=/path/to/coco/export
JSON_FILE=$COCO/result.json
IMAGES=$COCO/images
Conversion:
git clone https://github.com/heartexlabs/label-studio-converter.git
cd label-studio-converter
label-studio-converter import coco \
-i $JSON_FILE \
--image-root-url=/data/local-files/?d=images \
-o output.json
Run label studio:
LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true \
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=$COCO \
label-studio
Follow the steps spat out by the conversion IN ORDER (repeated here):
- Create a new project in Label Studio
- Use Labeling Config from "/path/to/your/local/git/clone/of/label-studio-converter/output.label_config.xml"
- Setup serving for images [e.g. you can use Local Storage (or others):
https://labelstud.io/guide/storage.html#Local-storage] - Import "/path/to/your/local/git/clone/of/label-studio-converter/output.json" to the project
Step 3 looks like this:
What is IMPORTANT is the relationship between LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=$COCO
and Absolute local path
in the screenshot above, and the latter has to be a sub-directory of the former, as per this cryptic bit of documentation:
"start from the first directory" is just the relationship I described a moment ago.
from label-studio-converter.
- --output should be directory.
- are you sure that convertor script sees your images? If it can't find images, no annotations will be added to output json file.
from label-studio-converter.
Sorry for a late answer, I've just found that you are trying to convert from LS to COCO, instead of COCO => LS.
Check this message:
HumanSignal/label-studio#2806 (comment)
and this YOLO => LS guide:
https://github.com/heartexlabs/label-studio-converter#yolo-to-label-studio-converter
COCO should be similar.
from label-studio-converter.
Thank you for your great instructions, I think we will use it for our docs about coco import.
BTW I've updated this part of Local storage docs, hope it's more clear now.
from label-studio-converter.
--input
should be a directory also. I'm getting further, but the code raises an error on this line where it tries to get the result
attribute from an annotation.
It doesn't seem as if result
is part of annotation
according to their schema?
Neither are completed_by, created_at, updated_at, lead_time.
from label-studio-converter.
Thank you for your great instructions, I think we will use it for our docs about coco import.感谢您的精彩指示,我想我们会将其用于有关可可导入的文档。 BTW I've updated this part of Local storage docs, hope it's more clear now.顺便说一句,我已经更新了本地存储文档的这一部分,希望现在更清楚了。
Based on your post (HumanSignal/label-studio#2806), I have done the following
python -m venv env
source env/bin/activate
git clone https://github.com/heartexlabs/label-studio-converter.git
cd label-studio-converter
pip install -e .
label-studio-converter import coco -h # just print help
label-studio-converter import coco -i your-input-file.json -o output.json
I've tagged the generated xml and put my image under /home/wjt/data/medical_pic
The data source is also set, but the image still cannot be displayed
Please also help me explain how to do the following
from label-studio-converter.
Related Issues (20)
- Are there any Plans to support Object Tracking formats?
- Export of OCR task into COCO and YOLO doesn't work HOT 2
- Export to YOLO format for Video Annotation Doesn't work.
- Export columns selection
- What is the correct way to convert bbox from label studio to LayoutLMv3Processor bbox format?
- Oriented Bounding Box HOT 1
- RectangleLabels : x,y values inconsistent HOT 1
- YOLO import to LS doesnt import labels HOT 2
- The iter_from_dir that uses`json.load` in method convert_to_voc does not open the json file.
- bug in "iter_from_json_file" method
- export to yolov8 format HOT 5
- CONLL Conversion drops NER labels from token classification
- How to make YOLO RAW tag output format be converted to pre-annotated
- Unable to convert multi-class instance segmentation dataset from YOLO TXT format HOT 1
- Why can't I use BrushLabel and export it to VOC?
- It can not handle COCO type datasets that don't have segmentation annotations HOT 1
- Trying to import a Pascal VOC dataset type and it does not work HOT 1
- [suggestion] Export format add YOLOV8-OBB
- Support for nltk>=3.8.1
- label-studio-converter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from label-studio-converter.