Quick Install and Store filenames with emoticons: Difference between pages

From LogicalDOC Community Wiki
(Difference between pages)
Jump to navigationJump to search
 
Giuseppe (talk | contribs)
No edit summary
 
Line 1: Line 1:
{{TOCright}} __TOC__
= Preparing a Dataset with Label Studio =


In less than five minutes you can install LogicalDOC and run it on your own server.
This guide explains how to create an annotated dataset for YOLO training using Label Studio.


== Windows ==
Install Label Studio using pip:


Requirements are:
<pre>
* Install java jdk 1.7
pip install label-studio
* Install LogicalDOC-Tomcat bundle
</pre>


==== Install Java JDK 1.7 ====
Verify the installation:
Go to the Oracle Java download site and select to download the Java Developer Kit (JDK) 7, latest update. The url is http://www.oracle.com/technetwork/java/javase/downloads/index.html (Note that the url or version number may change as time goes by). When the file has been downloaded, execute it to install Java on your system using the setup wizard.


==== Install LogicalDOC ====
<pre>
Download the LogicalDOC 6 + Tomcat 7 bundle and uncompress on your file system disk (a good option is to uncompress on ''C:\''). If you experience problems uncompressing '''logicaldoc-6.x.x-tomcat-bundle.zip''', try using 7-Zip or the WinRAR application to uncompress it.
python -m label_studio.server --help
</pre>


'''Application startup'''
Or refer to the official installation guide:
* Execute the command ''C:\tomcat\bin\catalina.bat start'' to run LogicalDOC + Tomcat application server.
https://labelstud.io/guide/install


'''Complete the installation'''
* Continue with the [[#Setup_Procedure|Setup Procedure]]


== Linux ==
=== Enable Local File Storage ===


Requirements are:
For large projects it is not recommended to upload images directly through the Label Studio interface. Instead, configure a local directory that contains the images to annotate.
* Install java jdk 1.7
* Install LogicalDOC-Tomcat bundle
There are several ways to install it. These steps were used to install on Ubuntu but can be used for any other Linux flavor.


=== Install Java JDK 1.7 ===
To enable local file access, configure the following environment variables before starting Label Studio:
Execute the following commands '''on the Terminal''' by copying and pasting them one at a time


$ sudo apt-get purge openjdk*
<pre>
$ sudo add-apt-repository ppa:webupd8team/java
LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
$ sudo apt-get update
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/path/to/images
$ sudo apt-get install oracle-jdk7-installer
</pre>


=== Install LogicalDOC ===
=== Starting Label Studio ===
Download the LogicalDOC 6 + Tomcat 7 bundle and uncompress on your file system disk (a good option is to uncompress under ''/opt/'').


Execute the following command on the terminal
Label Studio can be started using one of the following methods.


$ unzip '''logicaldoc-6.x.x-tomcat-bundle.zip'''


'''Application startup'''
==== Default Startup ====
* Execute the command ''/opt/tomcat/bin/catalina.sh start'' to run LogicalDOC + Tomcat application server.


'''Complete the installation'''
If local file storage is not required, Label Studio can be started with the default configuration:
* Continue with the [[#Setup_Procedure|Setup Procedure]]


== Mac OS X ==
<pre>
Requirements are:
label-studio start
* Install java jdk 1.7
</pre>
* Install LogicalDOC-Tomcat bundle


==== Install Java JDK 1.7 ====
or
Go to the Oracle Java download site and select to download the Java Developer Kit (JDK) 7, latest update.
The url is http://www.oracle.com/technetwork/java/javase/downloads/index.html (Note that the url or version number may change as time goes by).


Follow the instructions as shown in the installation page of JDK 7 for Mac
<pre>
http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html
python -m label_studio.server start
</pre>


=== Install LogicalDOC ===
By default, the application is available at:
Download the LogicalDOC 6 + Tomcat 7 bundle and uncompress on your file system disk (a good option is to uncompress under ''/Library'') or alternatively copy, move by OS X GUI, open a new finder window and browse your Macintosh HD, Locate and move/copy LogicalDOC 6 + Tomcat 7 inside the Library folder.


In OS X, open the Terminal application by browsing through Finder and navigate to Applications/Utilities folder and double click Terminal application.
<pre>
http://localhost:8080
</pre>


Execute the following command on the terminal OR alternatively, just double click the zip file you have copied/moved in the finder and it will extract itself! Same result and '''no need to type or use Terminal commands.'''
==== Startup with Local File Storage ====


$ unzip '''logicaldoc-6.x.x-tomcat-bundle.zip'''
When working with large datasets, it is recommended to configure Local Storage so that images are accessed directly from the filesystem.


'''Application startup'''
Windows example:
* Execute the command ''/Library/tomcat/bin/catalina.sh start'' to run LogicalDOC + Tomcat application server.


<pre>
set LABEL_STUDIO_PORT=8081
set LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
set LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=C:\Users\username\Documents\label-studio


'''Complete the installation'''
python -m label_studio.server start
* Continue with the [[#Setup_Procedure|Setup Procedure]]
</pre>


== Setup Procedure ==
After startup, Label Studio will be available at:
* Wait until the boot process of Tomcat ends
You should wait until you see a message on the console similar to the one shown below
INFO: Server startup in 8423 ms
* Restart Tomcat for the 2nd time
* Wait that the startup complete
* On a client browser, open the URL http://localhost:8080/logicaldoc/.
* You should see under the login form a triangle of warning, click on the link to the right to activate the setup procedure
* Perform the LogicalDOC Setup procedure using admin/admin as username/password in order to acces the protected setup section
* Define a folder (on the filesystem) to use for the document repository (in some systems it may be necessary in advance the creation of the folder setting the correct write privileges)
* Select the type of database to use, the fastest procedure is to select the internal database (of course you can decide to use a more efficient database, the only thing is that you first need to proceed to the creation of a database schema)


<gallery>
<pre>
File:01-wait-bootstrap-ends.png|caption|alt=alt language
http://localhost:8081
File:02-application-tobe-restarted.png|caption|alt=alt language
</pre>
File:03-start-the-setup-procedure.png|caption|alt=alt language
File:04-select-repo-folder.png|caption|alt=alt language
</gallery>


== First Login ==
The directory specified by '''LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT''' can then be configured as Local Storage within a Label Studio project.
* On a client browser, open the URL http://localhost:8080/logicaldoc/.
* Log in to LogicalDOC using user "admin" with password "admin".
* Enjoy LogicalDOC!
* Please take a look at http://forums.logicaldoc.com/ if you have any problem.


== Post Installation Notes ==
Port '''8081''' is used to avoid conflicts with the default LogicalDOC installation, which typically runs on port '''8080'''.
{{Advice|Once installed, please read the [http://docs.logicaldoc.com/en/system-access.html User's Guide] to familiarize yourself with LogicalDOC, or [http://docs.logicaldoc.com/en/administration-access.html Administration Guide] to become a LogicalDOC power administrator. In case of problems you can refer to the [http://forums.logicaldoc.com Community Forums].
You can also use the [http://issues.logicaldoc.com Bug Tracking] tool to report an issue with the software.}}


[[Category: Quick Install]]
 
=== Create a Project ===
 
# Login to Label Studio
# Click '''Create Project'''
# Enter a project name
# Configure the labeling interface
# Save the project
 
=== Import Images ===
 
# Open the project
# Click '''Import'''
# Select '''Local Storage'''
 
When importing images, choose '''Files''' as the import method.
 
Unlike CVAT, Label Studio creates one task for each imported document image.
 
[[File:LabelStudio-import-method.png|thumb|600px|center|Selecting the Files import method]]
 
=== Annotate Documents ===
 
# Open a task
# Select a label
# Draw a bounding box around the target area
# Save the annotation
 
Example labels:
 
* Invoice Number
* Date
* Seller Name
* Buyer Name
* Total Amount
 
[[File:LabelStudio-annotation-example.png|thumb|600px|center|Example annotation]]
 
=== Export the Dataset ===
 
# Open the project
# Click '''Export'''
# Select the desired format
 
Supported formats include:
 
* YOLO
* COCO
* Pascal VOC
* CSV
 
For YOLO training, export the dataset in YOLO format.
 
=== Dataset Formats ===
 
==== COCO ====
 
COCO is a JSON-based dataset format commonly used for object detection datasets.
 
More information:
https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/md-coco-overview.html
 
==== YOLO ====
 
YOLO datasets contain images and annotation files organized according to a predefined directory structure.
 
More information:
https://docs.cvat.ai/docs/dataset_management/formats/format-yolo/
 
==== YOLOv8 OBB ====
 
YOLOv8 OBB (Oriented Bounding Boxes) extends the standard YOLO format by supporting rotated bounding boxes using eight normalized coordinates.

Revision as of 12:33, 23 June 2026

Preparing a Dataset with Label Studio

This guide explains how to create an annotated dataset for YOLO training using Label Studio.

Install Label Studio using pip:

pip install label-studio

Verify the installation:

python -m label_studio.server --help

Or refer to the official installation guide: https://labelstud.io/guide/install


Enable Local File Storage

For large projects it is not recommended to upload images directly through the Label Studio interface. Instead, configure a local directory that contains the images to annotate.

To enable local file access, configure the following environment variables before starting Label Studio:

LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/path/to/images

Starting Label Studio

Label Studio can be started using one of the following methods.


Default Startup

If local file storage is not required, Label Studio can be started with the default configuration:

label-studio start

or

python -m label_studio.server start

By default, the application is available at:

http://localhost:8080

Startup with Local File Storage

When working with large datasets, it is recommended to configure Local Storage so that images are accessed directly from the filesystem.

Windows example:

set LABEL_STUDIO_PORT=8081
set LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
set LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=C:\Users\username\Documents\label-studio

python -m label_studio.server start

After startup, Label Studio will be available at:

http://localhost:8081

The directory specified by LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT can then be configured as Local Storage within a Label Studio project.

Port 8081 is used to avoid conflicts with the default LogicalDOC installation, which typically runs on port 8080.


Create a Project

  1. Login to Label Studio
  2. Click Create Project
  3. Enter a project name
  4. Configure the labeling interface
  5. Save the project

Import Images

  1. Open the project
  2. Click Import
  3. Select Local Storage

When importing images, choose Files as the import method.

Unlike CVAT, Label Studio creates one task for each imported document image.

File:LabelStudio-import-method.png
Selecting the Files import method

Annotate Documents

  1. Open a task
  2. Select a label
  3. Draw a bounding box around the target area
  4. Save the annotation

Example labels:

  • Invoice Number
  • Date
  • Seller Name
  • Buyer Name
  • Total Amount
File:LabelStudio-annotation-example.png
Example annotation

Export the Dataset

  1. Open the project
  2. Click Export
  3. Select the desired format

Supported formats include:

  • YOLO
  • COCO
  • Pascal VOC
  • CSV

For YOLO training, export the dataset in YOLO format.

Dataset Formats

COCO

COCO is a JSON-based dataset format commonly used for object detection datasets.

More information: https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/md-coco-overview.html

YOLO

YOLO datasets contain images and annotation files organized according to a predefined directory structure.

More information: https://docs.cvat.ai/docs/dataset_management/formats/format-yolo/

YOLOv8 OBB

YOLOv8 OBB (Oriented Bounding Boxes) extends the standard YOLO format by supporting rotated bounding boxes using eight normalized coordinates.