pose6d — User Guide

pose6d finds objects in a camera image and reports their full 6D pose (position and orientation) so a robot arm can pick them. You teach it a new object by labeling a few images, it trains a keypoint-detection network, and from then on it detects every instance of that object live and streams the poses to the robot over TCP/IP.

This guide explains every control in the desktop application: what it does, where its value is stored, the sensible default and when to change it. It also documents the configuration files, the robot communication protocol and the files the application writes.

Validation tab: six wooden bricks, each with a red/green/blue pose axis drawn at its origin
The Validation tab detecting six instances of the sample object bricks-15. Each red/green/blue axis is one estimated 6D pose.

Getting started

Launching the app

The same application runs in three ways:

HowCommandUse it for
From sourcepython main_app.py from the pose6d folder, with the project environment activated (on the development PC: C:\Work\Envs\qtgui)Development, labeling, training
Deployed exepose6d.exe (built by main_app_deploy.py; entry point main_app_wrapper.py)Production PCs next to the robot
Web interfacepython -m webapp, then open http://127.0.0.1:5000/ Quick detection tests and remote viewing. No labeling or training.

Installing from source (Windows):

python -m venv C:\Work\Envs\qtgui
C:\Work\Envs\qtgui\Scripts\activate.bat
pip install torch torchvision            # or the CUDA build: --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
Notepyrealsense2 is only needed for Intel RealSense cameras (D435 / D455 / D580 are the tested models). A plain USB webcam works without it.

Source mode vs deployed mode

The application detects at startup whether it runs from source or deployed (pose6d.exe, or the Cython-compiled modules in pose6d_deploy) and behaves slightly differently:

BehaviourSourceDeployed
License check at startupSkippedChecked. See License.
Console logEverything (DEBUG and up)Warnings and errors only
Log fileNonelogs\pose6d.log next to the exe (INFO and up, 5 MB × 4 files). If that folder is not writable: %LOCALAPPDATA%\pose6d\logs.
Validation debug overlaysShownShow Heatmap and Show Joints are hidden

Two environment variables override this, for testing or support:

VariableValuesEffect
POSE6D_DEPLOY_MODEfrozen · cython · sourceForces the mode instead of detecting it
POSE6D_LOG_DIRa folder pathWrites the deployed log file there instead

Layout & navigation

The main window is a row of tabs. They follow the order you normally work in:

TabPurpose
📈 WorkflowStep-by-step overview; create or select the object, basic camera/robot/communication choices
📷 Camera SetupConnect the camera, capture images, calibrate the camera lens (intrinsics)
🖊️ Object TeachingLabel keypoints on images and train the detection model
🔍 ValidationRun the trained model on a camera, an image, a folder or a video; publish results to the robot
📐 Robot SetupHand-eye calibration between camera and robot
📡 CommunicationRobot server and a test client, with a live monitor of every packet
⚙️ SettingsEdit the active object's object_config.json in a form
📊 Results & LogsResults list (placeholder for now)
🔑 LicenseLicense status and activation

Where data lives

Everything that belongs to one object lives in one object folder, by default under data\objects\:

data\objects\bricks-15\
  object_config.json   ← the object's settings: keypoints, camera, detection (see reference)
  images\              ← captured images, plus one <image>.json label file next to each labeled image
  models\              ← trained checkpoints keypoint_group_model_NNNN.pth
  cameras\             ← calibration.json (camera intrinsics)
  results\             ← benchmark / evaluation output
  labels\              ← reserved
  robots\              ← reserved

Application-wide state that is not tied to an object is kept in pose6d_config.json in the pose6d folder: the last selected object, the default camera type, communication addresses. It is machine-local, created on first run, and never shipped.

Concepts & vocabulary

TermMeaning
ObjectOne kind of part the robot should pick, for example a wooden brick. Stored as an object folder.
Keypoint / target pointA named, distinctive point on the object (a corner, an edge midpoint) with known 3D coordinates in millimetres in the object's own coordinate frame. bricks-15 has 13: corners t1–t4 (top), b1–b4 (bottom), edge midpoints c12 c23 c34 c14 and the top centre tc.
Object Id (instance)Several copies of the same object can appear in one image. Each copy gets its own id (1, 2, 3 …) when labeling, and detection reports one result per instance.
LabelThe pixel position of a keypoint on one image, saved in <image>.json.
ModelThe trained keypoint network, models\keypoint_group_model_NNNN.pth (NNNN = epoch). The highest number is used for detection and for further training.
PoseWhere the object is relative to the camera: tvec = translation (x, y, z) in millimetres, rvec = rotation as a Rodrigues rotation vector in radians (axis × angle). Computed with PnP from the detected keypoints and their 3D coordinates.
Quality0–1 score of how well the detected keypoints fit the object model. Closer to 1 is a tighter fit; good detections of the sample object score about 0.97–0.99.
IntrinsicsThe camera's lens parameters (focal lengths, image centre, distortion), found by camera calibration. Needed for correct poses.
Hand-eye calibrationFinding where the camera sits relative to the robot flange (camera on the arm), so poses can be converted into robot coordinates.

📈 Workflow

A checklist of the whole process. The left column shows the seven steps (green = done, blue = current); the right side shows the current step's description and, for some steps, its controls. Move with Previous Step / Next Step at the bottom. Steps 4 and 7 have no controls of their own; use the Validation and Results tabs.

Step 1 · Initialize Project

Workflow step 1 with Current Object path and Select Object, Select Multiple and Create New buttons
ControlWhat it does
Current ObjectPath of the active object folder. Every tab works on this object. Restored from the previous session at startup.
Select Object …Folder picker. Choose an existing object folder; it becomes the active object for all tabs.
Create New …Opens the Create New Object dialog (below) and creates a new object folder.
Select Multiple …Intended for working with several objects at once. Currently opens the same Create New Object dialog (see known limitations).
Create New Object dialog with Parent Folder and Object Name
Create New Object: Parent Folder (default data\objects, Browse… to change) and Object Name.

OK creates <parent>\<name>\ with the standard sub-folders and a default object_config.json, and makes it the active object.

A new object starts with a placeholder geometryA new object gets a 9-point cube (A1–A8, TC) as its keypoints, not your real object. Rename points and set their real coordinates in Object Teaching (double-click a target point). To change the number of points or the faces used by Show Shape, edit point_names / point_coord / point_faces in the Settings tab before you start labeling.

Step 2 · Setup & Calibrate Camera

Workflow step 2 with a Camera Type dropdown
ControlWhat it does
Camera TypeDefault camera type in pose6d_config.json (camera_type). The camera that is actually opened is set per object in Camera Setup, so the two can differ.

Step 3 · Teaching Object Model

Workflow step 3 with Object and Object Type dropdowns
ControlWhat it does
ObjectEvery valid object folder under the objects directory. Picking one makes it the active object (same as Select Object).
Object TypeKind of object model: CHESSBOARD, BOX, KEYPOINT, POSE, SKELETON. Written to the object's object_config.json immediately. Trained keypoint objects such as bricks-15 use POSE; only this type produces 6D poses for the robot.

Step 5 · Camera Robot Calibration

Workflow step 5 with Robot Type and Camera Position dropdowns
ControlValuesWhat it does
Robot TypeUR KUKA TM ABB FANUC YASKAWA DENSO DOBOT OTHERRobot brand, stored as robot_type in pose6d_config.json
Camera PositionMoving (On Arm) · StaticCamera mounted on the robot arm or fixed in the cell, stored as camera_position

The calibration itself runs in Robot Setup.

Step 6 · Robot Communication

Workflow step 6 with IP, port and protocol fields and a Test Connection button
ControlDefaultWhat it does
This computer IP / Port0.0.0.0 / 5000Local address, saved as local_ip / local_port
Destination IP / Port127.0.0.1 / 5000Robot controller address, saved as remote_ip / remote_port
ProtocolTCP-IPTCP-IP or MODBUS
Test ConnectionSaves the fields, then tries a TCP connection to the destination for 2 s. The button turns Connection OK (green) or Connection Failed (red). MODBUS testing is not implemented and always reports failure.
NoteThese addresses describe the robot controller. The pose server that sends detection results to the robot is started from the Communication tab or from Validation → Output, and has its own address (default 127.0.0.1:5005).

📷 Camera Setup

Connect the camera, look at the live image, capture images for labeling, and calibrate the camera lens.

Camera Setup tab with camera settings, calibration panel and a live image of bricks on a table

Camera Settings

ControlValuesWhat it does / guidance
Camera TypeREALSENSE WEBCAM0 WEBCAM1 BASLER IDS FLIR DALSA GENICAM OTHERCamera driver to use. RealSense, webcam and Basler have their own drivers; the other entries currently open through the generic webcam (OpenCV) driver. Stored per object in camera_parameters.camera_type.
Resolution1280x720 · 640x480 · 640x360Requested capture size. Higher is more detail but slower detection. Calibrate the camera again after changing it, because the intrinsics depend on the resolution.
Exposure330 100 200 500 1000 2000 5000, or type a valueExposure in the camera's own units, applied immediately while connected. Lower it if moving parts look blurred; raise it in a dark cell.
💡 Projector: ON/OFFRealSense IR dot projector. Turn it off if the dot pattern is visible in the images you label.
Saved Image FormatRGB Left Right Depth RGD LRD AllWhich stream(s) Save Image writes. Use RGB for labeling. Left/Right/Depth need a RealSense camera.
📂 Load Init FileOpens a file dialog for an .ini settings file. Loading is not implemented yet.

Capturing images

  1. Select the object first (Workflow, step 1). Images are saved into that object's folder.
  2. Set Camera Type, Resolution and Exposure, then click 🟢 Connect Camera. The live image appears on the right and the button turns red (🔴 Disconnect Camera).
  3. Click 🖼️ Save Image for each view. Move the objects and the camera between shots: different positions, angles, lighting and partial occlusions make a more robust model.

Images are saved as <format>_YYYYMMDD_HHMMSS.png (for example rgb_20261028_141502.png) in the object's images\ folder, or in the folder chosen with Select Image Folder in the calibration panel if you picked one.

How many images?The sample object bricks-15 was trained from 14 labeled images with several bricks each. Start with 10–20 varied images and add more where detection is weak.

Camera Calibration

Computes the camera intrinsics from photos of a printed chessboard (doc\checkerboard_pattern.pdf).

ControlValuesMeaning / guidance
Calibration Pattern6x9 7x10 4x11 5x5, or type NxMNumber of inner corners of the chessboard (columns × rows), not squares.
Square size (mm)10 20 30 50 100 200 300, or type a valueSide of one printed square, measured on the print. It sets the scale of the calibration.
📁 Select Image FolderFolder with the chessboard photos; they are listed under Images. Click one to view it.
🛠️ CalibrateRuns the calibration on every image in the folder.
Expected resultA Calibration Complete message. The camera matrix and distortion are written to the object's object_config.json and to cameras\calibration.json, which detection reads.

Take 15–25 photos with the board filling different parts of the image and tilted at different angles. An invalid pattern or square size shows Bad Pattern / Bad Square Size; too few usable images show Calibration Failed.

🖊️ Object Teaching

Mark where each keypoint is on your images, check the labels with overlays, and train the model.

Object Teaching tab: an image with labeled keypoints on six bricks in different colors, target point list with coordinates

Controls

ControlWhat it does
🖱️ Select ObjectSwitches to another object folder. Shows Invalid Object if the folder has no valid object_config.json.
Object IdInstance number 1–20 you are labeling. Each instance is drawn in its own color. Label every visible copy of the object in an image with a different id.
❌ Delete ObjectRemoves all points of the selected Object Id from the current image.
Target PointsThe object's keypoints with their 3D coordinates in mm. The selected point is the one the next click places. Double-click a point to rename it or change its X/Y/Z. That changes the object model for all images, not the label on this image.
🗑️ Clear PointsRemoves all points from the current image (not saved until Save Points).
💾 Save PointsWrites the points to <image>.json next to the image and turns the image green.
➖ Delete PointDeletes the selected Target Point from the object model. See Adding and deleting target points.
➕ Add PointAdds a new Target Point to the object model. See Adding and deleting target points.
📁 Select Image FolderFolder whose images appear in the Images list (default: the object's images\).
ImagesClick to load. Labeled images (with a saved .json) are shown in green.
📐 Show AxisComputes each instance's pose from the labels and draws its coordinate axis (X red, Y green, Z blue).
🔷 Show ShapeSame, but draws the object's faces (point_faces) as outlines.
🚀 Train ModelStarts or stops training. See Training.

Labeling an image

  1. Pick an Object Id (start with 1) and click an image in the Images list.
  2. Click a row in Target Points, or just start: the first point is pre-selected.
  3. Left-click the keypoint's position on the image. A cross and label appear and the selection moves to the next point, so you can click through the whole object in order.
  4. Right-click near a point to delete it.
  5. Repeat with the next Object Id for every other copy of the object in the image.
  6. Click 💾 Save Points.

Label only points you can actually see; hidden corners are left out. Loading a green image shows its saved points so you can fix them and save again.

Adding and deleting target points

The Target Points list is the object model: the keypoint names and their 3D coordinates in mm. Add Point and Delete Point change that model and save it straight into the object's object_config.json (point_names, point_coord). No Save Points is needed. Select an object first.

Add target point dialog with a suggested label name P14 and X, Y, Z coordinate fields in mm
➕ Add Point: enter the name and the point's position on the object in mm.
ButtonWhat it does
➕ Add PointOpens a dialog with a suggested free name (A9 after A1…A8, otherwise P<n>) and X/Y/Z in mm. OK adds the point at the end of the list, so the existing points keep their order. An empty or already used name is refused. The new point is selected, so you can start labeling it right away.
➖ Delete PointDeletes the point selected in the list, after you confirm. It is also removed from point_faces (a face left with fewer than 3 points is dropped) and from the labels of the current image and of every <image>.json in the image folder.
Retrain after changing the points.Adding or deleting a point changes the number of keypoints, so a model trained before the change no longer matches the object. Label the new point on your images, then train again. Deleting cannot be undone. Copy the object folder first if you may need the old labels.

Checking labels with overlays

Turn on Show Axis or Show Shape after labeling. If the axes sit on the object corners and the outlines match the edges, the labels, the 3D coordinates and the camera calibration agree.

Labeled image with a pose axis drawn on each brick
Show Axis: one pose axis per labeled instance.
Labeled image with face outlines drawn on each brick
Show Shape: the faces defined in point_faces, projected with the computed pose.
Nothing drawn for an instance?An instance needs at least 4 labeled points. The overlay is also skipped (with a warning in the log) when the reprojection error is above 5 px, which usually means a mislabeled point, wrong 3D coordinates, or a missing or wrong camera calibration.

Training

Training progress bar over the image: epoch 120 of 500, 24 percent, loss and error reduction
While training runs, a progress bar over the image shows the epoch, the percentage, the current loss and how much the error has dropped.
  1. With the labeled object selected, click 🚀 Train Model.
  2. If the object has no model yet, confirm No Model Found → start training?. If a model exists, Model Exists → retrain it? continues from the latest checkpoint instead of starting over.
  3. Training runs in the background; the app stays usable. The button reads 🛑 Stop Training.
  4. To stop early, click it again. You are asked whether to save the model at the current epoch (Save Partial Model).
SettingWhereDefaultMeaning
Epochsdetection_parameters.n_epochs100Passes over the training images, for a new run and for each retrain
Learning ratedetection_parameters.lr0.0001Step size of the optimiser. Leave it unless training diverges.
Image scaledetection_parameters.image_scale0.5Images are scaled by this before entering the network. Smaller is faster but loses small details.
Train splitdetection_parameters.train_split0.95Fraction of labeled images used for training; the rest for validation.

n_epochs and lr are not in a new object_config.json; add them to detection_parameters (Settings tab or a text editor) to change them. Checkpoints are written to models\keypoint_group_model_NNNN.pth.

🔍 Validation

Runs the trained model and shows the detected poses. It can also publish every result to the robot.

Validation tab with both pose axes and face outlines drawn on six bricks
Detector ON with Show Axis and Show Shape.

Configuration

ControlValuesWhat it does
SourceCamera Image Directory Video File Video StreamWhere the images come from. See the table below.
Objectsobjects in the objects directoryObject (and its model) to detect. Selecting one loads it.
OutputScreen MP4 File TCP/IP Stream ROS Topic MQTTScreen: display only. TCP/IP Stream: also computes the poses of every frame and publishes them to the robot server, starting it if needed (see Communication). MP4 File, ROS Topic and MQTT are not implemented yet and behave like Screen.
SourceBehaviour after 🟢 Detect…
CameraConnects the object's camera (or reuses the Camera Setup connection) and detects on the live image until 🔴 Stop Detection.
ImageAsks for one image file, detects once and shows the result.
DirectoryAsks for a folder and goes through all its images (.png .jpg .jpeg .bmp) in name order, over and over until you press Stop. Stops by itself if none of the files can be read.
Video FileAsks for an .mp4 / .avi and plays it at its frame rate, detecting every frame, until the end or Stop.
Video StreamNot implemented yet.

Display Info

ControlWhat it does
💡 Detector: ON/OFFMain switch for detection on screen. With it off you see the plain image. (TCP/IP output still detects.)
📐 Show AxisPose axis per detected instance: X red, Y green, Z blue, at the object origin.
🔷 Show ShapeObject face outlines (point_faces) projected with the detected pose.
🌡️ Show HeatmapRaw network output: where the model believes each keypoint is. For diagnosing weak detection. Hidden in the deployed app.
🔗 Show JointsDetected keypoints and how they were grouped into instances. Hidden in the deployed app.
+ Cross: ON/OFFCrosshair at the image centre, for aligning the camera.
CoordinatesCamera · Object · Robot. Frame for displayed poses. Not applied yet: poses are always in camera coordinates.
Text Size10 · 20 · 50. See known limitations: this field currently changes the camera exposure.
Reading the resultEach detected instance gets its own axis and/or outline. Instances with fewer than 4 detected keypoints get no pose. If nothing is drawn: check that the Detector is ON, the right object is selected, and the object is visible and not cut off by the image border.

Sending results to the robot

Validation tab with Output set to TCP/IP Stream

Set Output = TCP/IP Stream and start detection. For every frame, the model runs once and the same result is drawn on screen and stored in the robot server. Each time the robot asks (get results) it receives the newest result. The server keeps running when you stop detection or switch the output back; stop it from the Communication tab.

📐 Robot Setup

Hand-eye calibration: finds the camera's position on the robot flange from images of a chessboard taken at known robot poses.

Robot Setup tab with a chessboard image and the robot pose of that image
ControlWhat it does
🟢 Connect CameraLive view from the camera; enables Save Image.
Save ImageSaves the current frame as capture_N.jpg (in the folder pose6d was started from) and adds it to the list.
Calibration MethodIntrinsic · Extrinsic · Hand-Eye. Currently not used: Calibrate System always runs hand-eye calibration.
Robot ModelHow the three rotation values of a robot pose are read. UR-Euler: Euler angles, R = Rz·Ry·Rx (degrees if any value is above 2π, otherwise radians). All others (UR-RVEC, KUKA, DENSO, ABB, TM, NEURA, DOBOT): rotation vector in radians.
Image FilesImages in data\robot_calibration\. Selecting one shows it and fills Robot Pose from the dataset file.
Robot Pose tX tY tZ / rX rY rZRobot flange pose when the selected image was taken (translation in mm, rotation per Robot Model). Display only.
✨ Calibrate SystemRuns the calibration on the whole dataset (OpenCV calibrateHandEye, Tsai method).

Calibration dataset

The images and camera_robot_calibration.json must be in data\robot_calibration\:

{
  "chessBoardSize": [9, 6],          // inner corners (columns, rows)
  "chessBoardSquareSize": 10.0,      // mm
  "viewInfo": [
    { "imageName": "calib_robot_0001.jpg",
      "robotPose": [142.72, 356.93, -74.27, 0.5825, 3.0991, 0.0186] },   // x y z (mm), r1 r2 r3
    ...
  ]
}

At least 3 images with a detected chessboard are required; 10–15 views with large rotations between them give a stable result.

Where is the result?The calibration result (samples used, camera RMS error, camera matrix, distortion, and the camera-to-gripper rotation R_cam2gripper / translation t_cam2gripper) is currently only printed to the console window. It is not shown in the tab or saved.

📡 Communication

Runs the pose server the robot connects to, and a test client that behaves like a robot. Both monitors show every packet the server receives and sends.

Communication tab: server running, client connected, request and response monitors with detection results

Robot Server

ControlDefaultWhat it does
ProtocolTCP/IPOnly TCP/IP is available.
Server IP Address127.0.0.1Address the server listens on. Use the PC's network address (or 0.0.0.0 for all) when the robot is a different machine.
Server Port5005TCP port, 1–65535.
▶ Server Start / ⏹ Server StopStarts or stops the server. The server may also have been started by Validation with Output = TCP/IP Stream; the button follows its real state.
Status lineListening address, number of requests answered, latest frame number and number of detected objects.
The server only has results while detection runsResults are published while the Validation tab is detecting with Output = TCP/IP Stream. Otherwise a client is answered with the last result, or with "success": false, "message": "No results yet".

Client

ControlWhat it does
Server IP Address / PortServer to connect to: this app's server, or any other pose6d server.
▶ Client Start / ⏹ Client StopConnects (3 s timeout) or disconnects.
Commandget results or ping.
📤 Send CommandSends the command once.
Repeat every [ms]Sends the command repeatedly at this period (minimum 50 ms). While the model runs on the GUI thread the real rate is at most one request per detected frame.
Clear MonitorsEmpties both monitors (each keeps at most 3000 lines).

Protocol reference

Each message is a 4-byte big-endian length followed by that many bytes of UTF-8 JSON. The client sends a request and the server answers on the same connection, any number of times.

RequestResponse result
{"command": "get results", "params": {}}Latest detection, see below
{"command": "ping", "params": {}}{"success": true, "message": "pong"}
anything else{"success": false, "message": "Unknown command: …"}
{ "status": "ok", "command": "get results",
  "result": {
    "success": true,
    "frame_id": 128,                    // increases by 1 per processed frame
    "timestamp": 1793190045.698,        // seconds since 1970 when the frame was processed
    "objects": {
      "1": { "success": true,
             "rvec": [2.2796, -0.6202, -0.0567],   // rotation vector, radians
             "tvec": [-206.12, 118.24, 1553.01],   // translation, mm, camera frame
             "quality": 0.9798 },
      "2": { "success": false, "rvec": null, "tvec": null, "quality": 0.0 }
    } } }
FieldMeaning
statusok, or error with a message if the server failed to handle the request
frame_idSame number in two answers means no new frame was processed in between
objectsOne entry per detected instance, keyed by instance number
success (object)false when too few keypoints were found to compute a pose; skip that entry
rvec / tvecObject pose in the camera frame (see concepts). Convert with the hand-eye result for robot coordinates.
quality0–1 fit score; reject low values (for example below 0.9) in the robot program

A minimal robot-side client in Python:

import json, socket, struct

def request(sock, command):
    payload = json.dumps({"command": command, "params": {}}).encode()
    sock.sendall(struct.pack(">I", len(payload)) + payload)
    size = struct.unpack(">I", sock.recv(4, socket.MSG_WAITALL))[0]
    return json.loads(sock.recv(size, socket.MSG_WAITALL))

with socket.create_connection(("127.0.0.1", 5005)) as s:
    result = request(s, "get results")["result"]
    for obj_id, obj in result["objects"].items():
        if obj["success"] and obj["quality"] > 0.9:
            print(obj_id, obj["tvec"], obj["rvec"])

⚙️ Settings

A form for the active object's object_config.json. The object path is shown at the top; the form reloads when you switch objects.

Settings tab showing Application and Object Parameters sections as form fields
Field typeHow to edit
Number / textType directly. Check boxes for true/false values.
Short list or matrixOne box per value (e.g. pose, point_coord, intrinsic_matrix).
List of namesComma-separated, e.g. t1, t2, t3.
Nested listRaw JSON, e.g. [["t1","t2","t3","t4"],["b1","b2","b3","b4"]]. Hover for a hint.

Save Configuration checks the values first and saves only if all checks pass:

  • point_names and point_coord have the same number of entries, and every coordinate is [x, y, z];
  • every name in point_faces exists in point_names;
  • every resolution is [width, height];
  • intrinsic_matrix is 3×3.

object_config.json reference

object_parameters

KeyExampleMeaning
namebricks-15Object name (the folder name)
typeposeObject model type, see Object Type
point_namest1 … tcKeypoint names, in the order the network learns them
point_coord[[0,0,40], [0,70,40], …]3D position of each keypoint in mm, same order as point_names. Defines the object frame: the pose axis is drawn at (0, 0, 0).
point_faces[["t1","t2","t3","t4"], …]Closed outlines drawn by Show Shape
resolution[1920, 1080]Image size of the training images
id, pose, image_pathBookkeeping; not needed for detection

camera_parameters

KeyExampleMeaning
camera_typeWEBCAM0Camera driver, see Camera Type
cameraid0Device index for webcams. If that index fails, the first working camera (0–3) is used.
resolution[640, 480]Capture size requested from the camera
modergbStream shown: rgb, irl/irr (left/right IR), dep (depth), rgd, lrd, rgbd
intrinsic_matrix[[2700,0,960],[0,2700,540],[0,0,1]]Focal lengths and image centre in pixels. Replaced by camera calibration.
intrinsic_distortion[[0,0,0,0,0]]Lens distortion k1 k2 p1 p2 k3
exposure, gain, focus, format, crop_box, rotation_typeStored camera settings; exposure is set from Camera Setup

detection_parameters

KeyDefaultMeaning
image_scale0.5Scale applied to images before the network, for training and detection
train_split0.95Fraction of labeled images used for training
n_epochs100Training epochs (add the key to change it)
lr0.0001Learning rate (add the key to change it)
net_name, net_path, gain, augment_type, resolutionKept for compatibility; not used by the keypoint model

application and measurement_parameters are kept for compatibility and do not affect detection. Camera calibration also adds camera_matrix and camera_distortion at the top level.

📊 Results & Logs

Results and Logs tab with an empty results list

A placeholder list for calibration and run results; it currently only shows System initialized…. The application log is in the console window when running from source, and in logs\pose6d.log in the deployed app (see source vs deployed).

🔑 License

License tab: machine id, license status, Activate / Renew License button

pose6d uses an offline license locked to the machine. No network connection is needed.

ItemMeaning
Machine idIdentifies this PC. The license only works on the machine it was issued for.
StatusLicensed - expires: <date or never>, or why it is not valid: not activated, invalid format/signature, wrong machine, expired, clock rollback detected
FeaturesBitmask of licensed functions, see below
Activate / Renew License…Opens the activation dialog
License activation dialog with request code and enable code fields
  1. Under 1. Your request code, click Copy to Clipboard or Save Request File (.req)… and send it to your vendor.
  2. Paste the enable code you receive under 2., or click Load Enable File (.lic)….
  3. Click Activate. The license is saved as pose6d_license.lic in the folder pose6d is started from (for the exe, also looked up next to pose6d.exe).
Feature bitFunction
0x0001Detection display
0x0002Training
0x0004Robot communication. Without it, communication works for a 1-hour grace period, then the Communication tab is disabled.
0x0008Labeling
Do not set the PC clock backThe license detects a clock moved backwards and stops accepting the license for that session.

Vendors issue licenses offline with vendor_tools/issue_license.py (see docs/getting-started/licensing.md).

Worked examples

1 · Teach a new object from scratch

  1. Workflow → Create New…: name the object, for example bracket-01.
  2. Settings: replace the placeholder cube with the real keypoints: point_names, point_coord (mm, measured from a corner you choose as origin) and point_faces. Save Configuration.
  3. Camera Setup: connect the camera and calibrate it with 15–25 chessboard images.
  4. Camera Setup: Save Image 15–20 varied views of one or more parts.
  5. Object Teaching: label every visible part (one Object Id per part), Save Points per image, and check with Show Axis.
  6. Object Teaching → Train Model. When it finishes, test in Validation with Source = Directory on the same images, then with Source = Camera.
  7. Where detection is weak, capture and label more images of those situations and click Train Model again (retrain continues from the last checkpoint).

2 · Soak-test detection on a folder

Validation → Source = Directory, Detector ON, Show Axis ON → Detect… → choose the folder. The images repeat until you press Stop. Use it to watch for unstable or missing detections over many cycles without a camera.

3 · Stream poses to a robot

  1. Validation: Source = Camera, Output = TCP/IP Stream, Detect…. The server starts on 127.0.0.1:5005.
  2. For a robot on another machine: stop detection, set the server address in Communication (the PC's network IP), Server Start, then start detection again.
  3. Check with the built-in client: Communication → Client Start, Command = get results, Repeat every 1000 ms. Results appear in the lower monitor.
  4. Program the robot to send get results whenever it is ready to pick (see protocol), and to skip objects with success: false or low quality.

4 · Hand-eye calibration

  1. Fix the chessboard in the cell. Move the robot (camera on the flange) to 10–15 different poses that look at the board from different angles.
  2. At each pose save an image into data\robot_calibration\ and write its file name and robot pose into camera_robot_calibration.json.
  3. Robot Setup: choose the Robot Model that matches how your controller reports rotations, check a few images (the pose fields show what was read), then Calibrate System.
  4. Read the result in the console. A camera RMS error under 1 px indicates good images.

Troubleshooting

SymptomLikely cause → fix
Camera connects but the image stays black / "Failed to acquire an image"Some Windows camera drivers open the camera but never deliver frames through the default backend. pose6d tests for this and retries with DirectShow automatically; if it still fails, close other programs using the camera and try another cameraid.
Nothing is detectedDetector OFF; wrong object selected; object partly outside the image; model trained on too few or too different images. Turn on Show Heatmap (source mode) to see whether the model finds keypoints at all.
Some instances have no axisFewer than 4 keypoints were found for them (log: Object N has K keypoints (need >= 4)). Add training images with similar views or occlusions.
Axes are drawn but in the wrong placeCamera not calibrated, or calibrated at another resolution; wrong point_coord. Recalibrate and check Show Shape in Object Teaching.
Show Axis draws nothing in Object TeachingUnder 4 labeled points, or reprojection error above 5 px: a point is labeled with the wrong name or the 3D coordinates are wrong.
Server does not start (port in use?)Another program, or a second pose6d, is using the port. Choose another port or close the other program.
Client receives the same frame_id every timeDetection is not running, or Output is not TCP/IP Stream.
Communication tab is greyed outNo license with the robot-communication feature and the 1-hour grace period has ended. Activate a license with feature 0x0004.
Settings: Validation ErrorThe message lists the rule that failed (see Settings), most often point_names and point_coord with different counts.
Training is very slowTraining runs on the CPU without a CUDA build of PyTorch. Install the CUDA build, or lower image_scale.

Appendix A · Files written by pose6d

FileWritten byContent
<object>\object_config.jsonCreate New, Settings, Object Type, camera calibration, point editingObject definition and settings
<object>\images\<format>_<time>.pngCamera Setup → Save ImageCaptured images
<object>\images\<image>.jsonObject Teaching → Save Points{"points": [{"label", "object_id", "image_x", "image_y"}, …]}
<object>\models\keypoint_group_model_NNNN.pthTrainingModel checkpoint after epoch NNNN
<object>\cameras\calibration.jsonCamera Setup → Calibratecamera_matrix, dist_coeffs
pose6d_config.jsonMost tabsSession: last object, camera/robot/communication defaults
pose6d_license.licLicense activationEnable code
logs\pose6d.logDeployed appApplication log, rotated at 5 MB

Appendix B · Known limitations

Behaviour of the current version (v01.06) that differs from what the controls suggest:

WhereLimitation
Validation → Text SizeChanging it sets the camera exposure to the typed value instead of the text size.
Validation → CoordinatesNo effect; poses are always in camera coordinates.
Validation → OutputMP4 File, ROS Topic and MQTT are not implemented. Source Video Stream is not implemented.
Robot SetupCalibration Method is ignored; the hand-eye result is only printed to the console and not saved.
Workflow → Select MultipleOpens the Create New Object dialog.
Workflow → Camera TypeSets the session default; the camera actually used comes from the object (Camera Setup).
Workflow → Test ConnectionMODBUS is not tested and always reports failure.
Camera Setup → Load Init FileOpens a file dialog only.
Object TeachingKeypoints cannot be added or removed from the tab; edit point_names / point_coord in Settings.
Results & LogsPlaceholder; the tab title is shown as "Results _Logs".

Screenshots are captured from the real application with python docs/html/tools/capture_screenshots.py using the bundled sample object data/objects/bricks-15.