Setting up label-studio with a local directory
Refs:
- Adding a local folder as storage backend: Label Studio Documentation — Cloud and External Storage Integration
- Input .json tasks format: Label Studio Documentation — Import Data into Label Studio
The steps are:
- Create a local directory that will contain the files. Let’s assume
/home/sh/w/t/labelstudiodata - Create a subfolder there to keep your images, e.g.
pics, making the full path/home/sh/w/t/labelstudiodata/pics - Create your input data json.
[
{
"data": {
"ref_id": 1,
"image": "/data/local-files/?d=pics/cat1.png",
"image2": "/data/local-files/?d=pics/cat2.png",
"image3": "/data/local-files/?d=pics/cat3.png"
}
},
{
"data": {
"ref_id": 2,
"image": "/data/local-files/?d=pics/dhl1.png",
"image2": "/data/local-files/?d=pics/dhl2.png",
"image3": "/data/local-files/?d=pics/dhl3.png"
}
}
]
In the data, the paths are /data/local-files/?d=pics/cat1.png — start with /data/local-files/?d=, then the subdir, then the path to the file itself (here it’s flat: cat3.jpg)
- Start label-studio thus:
LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/home/sh/w/t/labelstudiodata label-studio
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT should point to your folder, WITHOUT the subfolder (no pics/) , and be absolute.
- Add your directory as storage backend.
Create your project as usual, and open its settings. The absolute local path is the SUBFOLDER of the document root:
“Treat every bucket as source” should be unchecked — in the documentation, they describe it differently from the screenshots, but it’s equivalent:
- 8. Import method - select “Tasks” (because you will specify file references inside your JSON task definitions)
“Check connection” should tell you if everything’s OK.
- DON’T sync the storage. Import the json you created from project import.
You should see your tasks.
- Bonus sample template for the above: []
<View> <View style="display: grid; grid-template-columns: 1fr 1fr 1fr; max-height: 300px; width: 900px"> <Image name="image1" value="$image"/>
<Image name="image2" value="$image2"/>
<Image name="image3" value="$image3"/> </View>
<Choices name="choice2" toName="image2">
<Choice value="Adult content"/>
<Choice value="Weapons"/>
<Choice value="Violence"/>
</Choices>
</View>
(h6_en is lm-eval)
and adding blocks — much less chaotic than 3d slicer (at first glance)
(EDIT: oh damn it’s 7, not 6!)
from the paper
+
- … leading to a probability not of 1/4(..10) but 1/2
- one way to filter out such bad examples is to get a LM to solve the task without providing context, or even better - look at the distribution of probabilities over the answers and see if some are MUCH more likely than the others
- Issue with 2-3-4 plurals: I can just create three classes of nouns, singular, 2-3-4, and >=5
- don’t forget to discuss the morphology complexities in the masterarbeit
- Conveying the issues in English is hard, but I can (for a given UA example)
- provide the morphology info for the English words
- provide a third German translation
G
(<
(same paper)
(pic from <
j
{:height=“500px”}
{:height=“500px”}.
{:width=“50%”}.
{:height=“500px”}.
{:height=“500px”}.
{:height=“500px”}.
{:height=“500px”}
{:height=“500px”}.
{:height=“500px”}.
{:height=“300px”}.
{:height=“300px”}.
{:height=“300px”}.