OpenVisualCloud / Smart-City-Sample

The smart city reference pipeline shows how to integrate various media building blocks, with analytics powered by the OpenVINO™ Toolkit, for traffic or stadium sensing, analytics and management tasks.
BSD 3-Clause "New" or "Revised" License
186 stars 80 forks source link

Problem with inference of YOLOv4 model at openvisualcloud #794

Closed divdaisymuffin closed 2 years ago

divdaisymuffin commented 2 years ago

Hi @nnshah1 @xwu2git

We need help with inference of yolov4 model at Smart-City-Sample, the same model we are successfully running at openvino, I am attaching error I am getting. Screenshot from 2021-11-08 12-13-14

The model proc I am using is at model-proc

The raw model file and converted IR file you can find at Model

We have also tried publicly available yolov4 model but with that also the error is same, Does openvisualcloud do not support YOLOv4?

divdaisymuffin commented 2 years ago

Hi @nnshah1 @xwu2git, I am updating about the trial of yolov4 inference on latest Smart-City-Sample, and it also failed with same error. We have tried yolov4-tiny as well but it also ended with same error logs.

nnshah1 commented 2 years ago

@divdaisymuffin I was able to run the model locally with a latest version of DL Streamer but I didn't see any inference results generated. Do you have sample image / video I could use to confirm?

divdaisymuffin commented 2 years ago

@nnshah1 You can find the v4_tiny.py Inference script, input.mp4 and v4_tiny_output.avi file in this link https://drive.google.com/drive/u/0/folders/1N4Lo7A5agMN_Ejc7_54qpi3zv_j_APCM

dsmertin commented 2 years ago

@divdaisymuffin Now we have good tutorial: https://github.com/openvinotoolkit/dlstreamer_gst/wiki/How-to-create-model-proc-file You can use it to build model-proc for your model (our model-proc files are not common and they appropriate one concrete model).

For your model should be good follow model-proc file:

{
    "json_schema_version": "2.0.0",
    "input_preproc": [],
    "output_postproc": [
      {
        "converter": "tensor_to_bbox_yolo_v3",
        "iou_threshold": 0.4,
        "anchors": [10.0, 14.0, 23.0, 27.0, 37.0, 58.0, 81.0, 82.0, 135.0, 169.0, 344.0, 319.0],
        "masks": [3, 4, 5, 1, 2, 3],
        "classes": 80
      }
    ]
  }
divdaisymuffin commented 2 years ago

@dsmertin Thanks a lot, let me try this.

dsmertin commented 2 years ago

Hi @divdaisymuffin

Еverything is fine, сan we close this issue?

divdaisymuffin commented 2 years ago

@dsmertin yes we can close this, it is working fine.