Obb model quantization poor benchmark

Hi Dear developers,

i have been through yolov8n-obb process on converting .onnx to .hef but during the process i getting a poor result after quantization. feel like i left out on something, Since hailo have detect,post,segment will there be any obb in future update. or for hailo tutorial i can see you guys have work on resnet will there be tutorial on yolo including all pre processing and postprocess workflow that will be helpfull for the community to understand the structure and how the quantization works.

2 Likes

I will check with our ML team. They are adding new models to the Model Zoo with every version.

I would recommend the following.

  • Make sure you go through the tutorials in the Hailo AI Software Suite docker. Call:
    hailo tutorial
  • Check out the ALLS files in the Hailo Model Zoo to see how we optimize the models in the Model Zoo.
    GitHub - Hailo Model Zoo - ALLS
    Some models need to be optimized with higher optimization levels others may need to use some 16-bit layers. There is no one size fits all solution and some experimentation may be needed for unknown models.
  • Use the Layer Analysis tool to identify the problematic layers in your model.

We would love to provide more tutorials. However there are many other features we want to add to our software offering as well.
There are some post in the forum that are also helpful like this one for the parsing YOLO models. So, try the search function.
Parsing yolo models with the hailo dataflow compiler
I will also discuss this with my colleagues and see what we can do.

Hope to hear a good news on providing tutorial on yolo

btw need a clarification the pre processing code for the model optimization and infer code should be same right.

Im asking this question because when I start the model optimization the input should be on floating right in order the quantization to standardize the model activation and weights. But after i get the model .hef when i run on hailo 8l the input shuld be on integer. Will that make the output result totally different from the actual result

FOR THE PREPROCESSING I JUST GET THE IDEA FROM ULTRALYTICS BELOW IS MY PRE PROCESSING CODE:

Blockquote
def formatToSquare(source):
col = source.shape[1]
row = source.shape[0]
_max = max(col, row)
result = np.zeros((_max, _max, 3), dtype=np.uint8)
result[0:row, 0:col] = source
return result

Blockquote
def preproc(image_path, output_height=640, output_width=640):

image = cv2.imread(image_path)
image = formatToSquare(image)
image = cv2.resize(image, (output_width, output_height))
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
image = image / 255.0
# image = image[np.newaxis, :, :, :]    
return image

any feedback over here?