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 11
pip install label-studio
* Install LogicalDOC-Tomcat bundle
</pre>


=== Install Java JDK 11 ===
Verify the installation:
You can choose between Oracle JDK, OpenJDK or AdoptOpenJDK


===== Oracle JDK =====
<pre>
Go to the Oracle Java download site and select to download the Java Developer Kit (JDK) 11, latest update. <br/>
python -m label_studio.server --help
The url is https://www.oracle.com/java/technologies/javase-jdk11-downloads.html<br/>
</pre>
(Note that the url or version number may change as time goes by).<br/>
When the file has been downloaded, execute it to install Java on your system using the setup wizard.


===== OpenJDK =====
Or refer to the official installation guide:
You can download the OpenJDK (free) version from the following site:
https://labelstud.io/guide/install
https://openjdk.java.net/
Just keep in mind that LogicalDOC starting from version xxxx requires JDK 11.
You should avoid newer versions because LogicalDOC has non been tested yet on those.


===== AdoptOpenJDK =====
AdoptOpenJDK is a free and open source version of OpenJDK.
It is an excellent version, always updated and supplied with a practical installer for Windows and packages for other systems.
You can download it quickly from the site https://adoptopenjdk.net/


=== Install LogicalDOC ===
=== Enable Local File Storage ===
Download the LogicalDOC 8 + Tomcat 9 bundle and uncompress on your file system disk (a good option is to uncompress on ''C:\''). If you experience problems uncompressing '''logicaldoc-8.x.x-tomcat-bundle.zip''', try using 7-Zip or the WinRAR application to uncompress it.


'''Application startup'''
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.
* Execute the command ''C:\tomcat\bin\catalina.bat start'' to run LogicalDOC + Tomcat application server.


'''Complete the installation'''
To enable local file access, configure the following environment variables before starting Label Studio:
* Continue with the [[#Setup_Procedure|Setup Procedure]]


== Linux ==
<pre>
LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/path/to/images
</pre>


Requirements are:
=== Starting Label Studio ===
* Install Java JDK 11
* 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 11 ===
Label Studio can be started using one of the following methods.
Execute the following commands '''on the Terminal''' by copying and pasting them one at a time


$ sudo apt-get purge openjdk*
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer


=== Install LogicalDOC ===
==== Default Startup ====
Download the LogicalDOC 8 + Tomcat 8 bundle and uncompress on your file system disk (a good option is to uncompress under ''/opt/'').


Execute the following command on the terminal
If local file storage is not required, Label Studio can be started with the default configuration:


$ unzip '''logicaldoc-8.x.x-tomcat-bundle.zip'''
<pre>
label-studio start
</pre>


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


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


== Mac OS X ==
By default, the application is available at:
Requirements are:
* Install Java JDK 11
* Install LogicalDOC-Tomcat bundle


==== Install Java JDK 11 ====
<pre>
Go to the Oracle Java download site and select to download the Java Developer Kit (JDK) 11, latest update.<br/>  
http://localhost:8080
The url is https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
</pre>
<br/>(Note that the url or version number may change as time goes by).


Follow the instructions as shown in the installation page of JDK 11 for Mac<br/>
==== Startup with Local File Storage ====
https://docs.oracle.com/en/java/javase/11/install/installation-jdk-macos.html


=== Install LogicalDOC ===
When working with large datasets, it is recommended to configure Local Storage so that images are accessed directly from the filesystem.
Download the LogicalDOC 8 + Tomcat 8 bundle and uncompress on your file system disk (a good option is to uncompress under ''/Library'') or alternatively copy, move by macOS GUI, open a new finder window and browse your Macintosh HD, Locate and move/copy LogicalDOC 8 + Tomcat 8 inside the Library folder.


In macOS, open the Terminal application by browsing through Finder and navigate to Applications/Utilities folder and double click Terminal application.
Windows example:


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.'''
<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


$ unzip '''logicaldoc-8.x.x-tomcat-bundle.zip'''
python -m label_studio.server start
</pre>


'''Application startup'''
After startup, Label Studio will be available at:
* Execute the command ''/Library/tomcat/bin/catalina.sh start'' to run LogicalDOC + Tomcat application server.


<pre>
http://localhost:8081
</pre>


'''Complete the installation'''
The directory specified by '''LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT''' can then be configured as Local Storage within a Label Studio project.
* Continue with the [[#Setup_Procedure|Setup Procedure]]


== Setup Procedure ==
Port '''8081''' is used to avoid conflicts with the default LogicalDOC installation, which typically runs on port '''8080'''.
* 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 access 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>
File:01-wait-bootstrap-ends.png|Wait bootstrap ends
File:02-application-tobe-restarted.png|Application restart
File:03-start-the-setup-procedure.png|Start setup procedure
File:04-select-repo-folder.png|Define repo folder
</gallery>


== First Login ==
=== Create a 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 https://forums.logicaldoc.com/ if you have any problem.


== Post Installation Notes ==
# Login to Label Studio
{{Advice|Once installed, please read the [https://docs.logicaldoc.com/en/entering-in-the-system User's Guide] to familiarize yourself with LogicalDOC, or [https://docs.logicaldoc.com/en/system/general-informations Administration Guide] to learn the administrator features.<br/>
# Click '''Create Project'''
In case of problems you can refer to the [https://forums.logicaldoc.com Community Forums].
# Enter a project name
You can also use the [https://issues.logicaldoc.com Bug Tracking] tool to report an issue with the software.}}
# Configure the labeling interface
# Save the project


[[Category: Quick Install]]
=== 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.