I was able to compile and generate the my own calibration cache and int8 engine file and conduct inference. However the generated engine provides no detection result. As I replaced my calibration cache with the given example “yolov3-calibration.table.trt7.0”, the generated int8 engine could detect objects correctly.
So I’m wondering if anyone can tell me how “yolov3-calibration.table.trt7.0” is generated in the first place, or what’s possible that went wrong in my process?
Let me know if there is anything else you need to know. Any advice is appreciated!
Please noted that you will need to apply the calibration on the same platform with the same TensorRT version.
Do you also do the calibration on Xavier with JetPack4.4?
Yes, I calibrated and deployed the model on the same machine, a Xavier with JetPack4.4
I also have narrowed the problem into the following lines. When I replaced the custom calibration file “test.calibration” with the provided “yolov3-calibration.table.trt7.0”, detection results were correct:
Please noted that there is a TensorRT engine file parameter in the Deepstream.
For example, model-engine-file=[model/name]_b1_fp16.engine.
If the engine file is pre-existing, Deepstream will deserialize it without re-converting from the model.
Is it possible that there is an engine generated from the other calibration file exist?
Hi,
Here are two calibration cache I have generated.
The test1.calibration is for a YOLOv3 model with only one class.
The test2.calibration is for a YOLOv3 model with 9 classes.
Both generated engines produce no detection result.
In case anyone is interested, I figured it out. The calibration pictures need to be normalized. Evidently the DeepStream YOLO implementation does it outside the network object so we need to do it again in the calibration step.
I tried calibration using this code.
( https://github.com/enazoe/yolo-tensorrt )
But, This calibaration code have not normalization.
Could you share me your normalization code?
Hi,
I can’t share the code with you but you can probably tweak the getBatch code to get what you want.
Also the moderator said that there is actually no need to normalize the image again so you may not be able to replicate the result.
Best.