Deepstream 6.0 container - File does not exist: OpenCV is required to run INT8 calibrator

Hi,

I am trying to convert my yolo model to int8 engine for deepstream container but having an issue with opencv INT8 calibrator does not exist.

I have installed opencv in the container by using the standard apt-get

apt install libopencv-dev python3-opencv

Still have the same issue.

Any ideas on how to solve this?

Hi,

Which sample do you use?
Are you using the sample from marcoslucianops?

Thanks.

Hi,

I am using this container nvcr.io/nvidia/deepstream-l4t:6.0-samples for the Jetson NX. I docker run and mount a drive as a volume so I can copy the calibration images/txt and custom model.

  git clone https://github.com/marcoslucianops/DeepStream-Yolo.git /opt/nvidia/deepstream/deepstream/sources/DeepStream-Yolo
  cd /opt/nvidia/deepstream/deepstream/sources/DeepStream-Yolo
  /bin/bash -c 'CUDA_VER=10.2 make -C nvdsinfer_custom_impl_Yolo'
  cp -r /usr/src/app/calibration calibration
  cp /usr/src/app/calibration.txt 
  cp /usr/src/app/calibration.txt .
  apt update
  apt-get install libopencv-dev python3-opencv
  export INT8_CALIB_IMG_PATH=calibration.txt
  export INT8_CALIB_BATCH_SIZE=1
  cp /usr/src/app/models/yolov8/yolov8n.wts .
  cp /usr/src/app/models/yolov8/yolov8n.cfg .
  cp /usr/src/app/models/yolov8/labels.txt .
  apt install nano
  nano deepstream_app_config.txt 
  nano config_infer_primary_yoloV8.txt
  deepstream-app -c deepstream_app_config.txt

Output after running command.

Total number of YOLO layers: 299

Building YOLO network complete
Building the TensorRT Engine

NOTE: letter_box is set in cfg file, make sure to set maintain-aspect-ratio=1 in config_infer file to get better accuracy

File does not exist: /opt/nvidia/deepstream/deepstream-6.0/sources/DeepStream-Yolo/calib.table
OpenCV is required to run INT8 calibrator

deepstream-app: yolo.cpp:98: nvinfer1::ICudaEngine* Yolo::createEngine(nvinfer1::IBuilder*, nvinfer1::IBuilderConfig*): Assertion `0' failed.
Aborted (core dumped)

The modification to the configuration files.

deepstream_app_config.txt - I also set to fakesink.

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV8.txt

config_infer_primary_yoloV8.txt - I only have 5 classes

custom-network-config=yolov8n.cfg
model-file=yolov8n.wts
model-engine-file=model_b1_gpu0_int8.engine
int8-calib-file=calib.table
labelfile-path=labels.txt
batch-size=1
network-mode=1
num-detected-classes=5

Hi,

Which JetPack version do you use?
It’s expected that Deepstream 6.0 image works with JetPack 4.6 GA.

Thanks.

I am using Jetpack 4.6. I will try it on a dev board than an industrial board.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

There is no “calib.table” in the original configuration DeepStream-Yolo/config_infer_primary_yoloV8.txt at master · marcoslucianops/DeepStream-Yolo (github.com), why do you change the configuration?

This sample is not provided by Nvidia, please contact the author for resolution.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.