dope4j-app
CONTENT

Usage

dope4j-app is a CLI application which can be used to run inference and detect object poses.

dope4j-app -action=<runInference|showResults> <options>

Actions

runInference

Required options:

Optional:

showResults

Read inference results from JSON file and for each image show cuboids of all detected objects.

Required options:

Optional:

Environment variables

It is possible to specify additional configuration through following environment variables:

Examples

First make sure that all native libraries available globally in the system or provided separately as follows:

export LD_LIBRARY_PATH=<PATH_TO_TENSOR_RT>/lib:<PATH_TO_CUDNN>/lib

Supported versions see in Requirements section.

Command to run inference for all images inside "/tmp/dataset" using ChocolatePudding model and:

./dope4j-app \ -action=runInference \ -modelUrl=/tmp/models/ChocolatePudding.onnx \ -objectSize=4.947199821472168,2.9923000335693359,8.3498001098632812 \ -cameraInfo=/tmp/dope4j/config/camera_info.yaml \ -imagePath=/tmp/dataset \ -recursiveScan=true \ -showVerticesBeliefs=true \ -showCenterPointBeliefs=true > /tmp/results.json

All the results are added to "/tmp/results.json" as follows:

grep "scene_0002/0004_rgb.jpg" /tmp/results.json | jq
{
  "imagePath": "/tmp/dataset/scene_0002/0004_rgb.jpg",
  "detectedPoses": {
    "objectCuboidModel": {
      "center": {
        "x": 0,
        "y": 0,
        "z": 0
      },
      "vertices": [
        {
          "x": 2.4735999107,
          "y": -1.4961500168,
          "z": 4.1749000549
        },
...

Command to show detected poses for images inside "/tmp/dataset" without running any inference but using results previously saved in "results.json"

./dope4j -action=showResults -resultsJson=/tmp/results.json