Image Data Annotation
Image Data Annotation with Label Studio
Set up the teleoperation image directory, configure environment variables and launch Label Studio to annotate your teleop image data, then copy annotated images to your local computer.
In order to label images captured during teleoperation sessions, you need to organize the files on the robot, configure Label Studio to serve them and then start the annotation server. After annotation, you can export or copy the labeled images to your computer for further processing.
mkdir -p /home/rcr/teleop_data/images
mv /home/rcr/teleop_data/session_*/*.jpg /home/rcr/teleop_data/images/
mkdir -p /home/rcr/teleop_data/annotations
Set environment variables so Label Studio can serve local files from your teleop_data directory. These variables must be exported in the current shell and persisted in your ~/.profile so they apply after a reboot.
export LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
export LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT="/home/rcr/teleop_data"
env | grep LABEL_STUDIO
To make these variables persistent, edit your profile and append the export statements:
echo 'export LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true' >> ~/.profile
echo 'export LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT="/home/rcr/teleop_data"' >> ~/.profile
Reload the profile with source ~/.profile or log out and back in.
cd /home/rcr/LabelMaker
source bin/activate
label-studio start -p 8080 -b
After labeling, you can copy the image dataset off the robot for safekeeping or further training. From your PC or Mac, run the following command in a terminal, replacing 192.168.1.n with your robot’s IP address:
scp -r rcr@192.168.1.n:/home/rcr/teleop_data/images /Users/$USER/Downloads/teleop_images
On Windows using scp (installed via Git or another package), specify the destination directory accordingly:
scp -r rcr@192.168.1.n:/home/rcr/teleop_data/images "C:\\Users\\YourName\\Downloads\\teleop_images"