snowzach / doods

DOODS - Dedicated Open Object Detection Service
MIT License
306 stars 31 forks source link

Health check url #2

Closed runningman84 closed 5 years ago

runningman84 commented 5 years ago

It would be great if you would provide some health check url für my kubernetes health check...

snowzach commented 5 years ago

You can use the /none endpoint. It just returns a 200

runningman84 commented 5 years ago

Does is also check if the communication with the coral stick is working fine?

snowzach commented 5 years ago

No it does not. The only real way to do that is to configure it to use the Coral stick and then use the GET /detectors endpoint and see if that detector is there. If it's not there, then it was not detected. It will also say in the logs.

runningman84 commented 5 years ago

If I get this result, does it mean the coral stick works just fine?

{
  "detectors": [
    {
      "name": "default",
      "type": "tflite",
      "model": "models/coco_ssd_mobilenet_v1_1.0_quant.tflite",
      "labels": [
        "person",
        "bicycle",
        "car",
        "motorcycle",
        "airplane",
        "bus",
        "train",
        "truck",
        "boat",
        "traffic light",
        "fire hydrant",
        "stop sign",
        "parking meter",
        "bench",
        "bird",
        "cat",
        "dog",
        "horse",
        "sheep",
        "cow",
        "elephant",
        "bear",
        "zebra",
        "giraffe",
        "backpack",
        "umbrella",
        "handbag",
        "tie",
        "suitcase",
        "frisbee",
        "skis",
        "snowboard",
        "sports ball",
        "kite",
        "baseball bat",
        "baseball glove",
        "skateboard",
        "surfboard",
        "tennis racket",
        "bottle",
        "wine glass",
        "cup",
        "fork",
        "knife",
        "spoon",
        "bowl",
        "banana",
        "apple",
        "sandwich",
        "orange",
        "broccoli",
        "carrot",
        "hot dog",
        "pizza",
        "donut",
        "cake",
        "chair",
        "couch",
        "potted plant",
        "bed",
        "dining table",
        "toilet",
        "tv",
        "laptop",
        "mouse",
        "remote",
        "keyboard",
        "cell phone",
        "microwave",
        "oven",
        "toaster",
        "sink",
        "refrigerator",
        "book",
        "clock",
        "vase",
        "scissors",
        "teddy bear",
        "hair drier",
        "toothbrush"
      ],
      "width": 300,
      "height": 300,
      "channels": 3
    }
  ]
}

Is it normal to take about 2s per detection on a intel atom machine with a connected coral stick?

hass/doods-6f4b6c868-lg7bh[doods]: 2019-09-03T21:15:19.926Z     INFO    tflite/detector.go:266  Detection Complete      {"package": "detector.tflite", "id": "", "duration": 1.803212066, "detections": 2}
hass/doods-6f4b6c868-lg7bh[doods]: 2019-09-03T21:15:19.928Z     INFO    server/server.go:88     API Request     {"status": 200, "took": 1.895765446, "remote": "10.42.0.164:52448", "request": "/detect", "method": "POST", "package": "server.request", "request-id": "doods-6f4b6c868-lg7bh/N1tj0m4f7L-001828"}
snowzach commented 5 years ago

No, you do not have the coral stick working. It looks like it's using the default detector. When the coral is working you'll have a model with edgetpu in the name.

How are you running in docker? Did you download an edgetpu model and update the config file?

runningman84 commented 5 years ago

Thanks for your hints, the config was still the default config. I have build a helm chart for doods: https://github.com/runningman84/helm-charts/tree/master/doods

The detection is now quite fast like 0.029264325s per detection

snowzach commented 5 years ago

Ahh, very good. Yes, that's more like it.

nic0dk commented 4 years ago

@runningman84 just wonna hear. did you managed to get tflite model to run with your edgetpu via doods ? the reason i ask is that im getting status: 408 (timeout)

and a last question, do you run doods in container?

runningman84 commented 4 years ago

Yes the edge tpu works fine. I am running it in a container using k3s. The health check might not be perfect because it does not really checks if the detection works end2end.

nic0dk commented 4 years ago

thx for replying - im using docker, but it seems like i can't get the edge tpu to work correctly on it. ill do some more playing around