Inaccuracys in converted DFC Model from self trained yolo11l for use in Frigate on hailo8

Hi,
so after months of not really getting satisfying results I’m finally caving in and creating a post on the Hailo Community Forum.
For starters I am just going to layout what I’m trying to achieve:

I’ve created a pretty accurate (at least for my needs) self Trained yolo11l Model for final Deployment on a Frigate Server Instance to perform Object Detection of, at the Moment, one Camera stream. In order to fulfill this requirement as performant and energy efficient as possible I opted for the hailo8 Accelerator approach which runs on a raspberry pi 5 in conjunction with an original Ai HAT+.

  • The yolo11l Model was trained on a Dataset with an image size of 3840x2160 (Part of the Images are from the same Camera which performs the Frigate Detection in the End)
  • The Model itself was trained to 640x640 via this Dataset
  • The Detection Camera Stream has the Resolution 1280x720@20fps

The Issue I’m now having is that I’m loosing a lot of the accuracy of the Original yolo11l Model during the Conversion progress via DFC.
After the Deployment of the .hef File I am frequently getting false Positives.
For example a Statue which is in the Camera Stream is constantly identified as a pigeon (one of the Original 10 Classes of the yolo11l Modell) when it is clearly is not that.
The same is true for a big Rock which constantly identifies as a Raven :distorted_face:

All these Detection don’t happen on the .pt or .onnx Model which I ran in parallel to the hailo Detector on a separate Machine on the same Camera Stream for testing purposes.

Don’t get me wrong the overal performance and detection ability of the resulting .hef Model is pretty good I think. Like the Detection of Persons and Dogs works almost flawlessly but nevetheless the false positives ruin the whole experience.

I think in regards to the DFC-Config I also tried pretty much everything with just minor improvements.
I’ve tried adaround and finetuning all in copnjunction with the respective optimization_levels of 2 and 3 and a whole lot of different calibration sets ranging from 256-2048 Images.
What’s also strange is that I’m getting better performance and accuracy with compression_level=0 instead of compression_level=1 (50ms to 70ms compute Time).

Also optimization_level=4 is completely out of the Question. For a 1024 images dataset (80GB adaround) that whould take Days or weeks to complete.

At this point I am really frustated and dont really want to proceed with the whole hailo stuff because at this moment it doesnt seem viable.
I’m spending more Time, computing Power and first and foremost Electricity in refining the yolo11 Model which already finished Months ago just to run well on the hailo accelerator.

So if anyone can point me to the exact Problem that would be very appreciated.
I’m especially interestest in the correct creation of the Calibration Dataset (currently scaled letterbox), according to my outlined needs, as well as the whole Optimization step I am using

Hi @Christoph_Schulzke, welcome to the Hailo Community!

It sounds like you’ve already tried quite a few things, so I understand your frustration. But I’m glad you opened this topic, let’s see if we can figure this out.

A few questions:

  1. Which end nodes did you use when parsing?

  2. Did you use this Model Zoo script as a starting point?

  3. Have you verified that the NMS configuration matches your 10 classes? Could you share your current NMS config json?

  4. When comparing the original model with the compiled HEF, are you using exactly the same input images and preprocessing? Are you using the same confidence and IoU thresholds?

Hi,
thanks for the quick reply.
So for the beginning here’s the Debug-Output from one of the latest Models I compiled:

(hailo_virtualenv) hailo@docker-desktop:/local/workspace/shared_with_docker/Scripte$ python3 main.py
\[info\] No GPU chosen, Selected GPU 1
Searching for images in /local/pytorch/Datasets/custom_dataset_heron/images_Hailo…
Found 1100 images
Creating calibration images for Hailo export
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1100/1100 \[02:31<00:00,  7.25it/s\]
Creating calibration datasets for Hailo export
Available memory: 37.56 GiB; Estimated float64 peak: 30.46 GiB; Estimated float32 peak: 10.98 GiB
Using in-memory float64 calibration processing
Normalized calibration dataset saved with shape: (1100, 640, 640, 3) to /local/pytorch/Datasets/custom_dataset_heron/calib_dataset_1100/calibration_data_normalized.npy
Processed calibration dataset saved with shape: (1100, 640, 640, 3) to /local/pytorch/Datasets/custom_dataset_heron/calib_dataset_1100/calibration_data_processed.npy
Found existing Hailo model HAR; skipping ONNX parsing: /local/workspace/shared_with_docker/yolo11l_640_300_Reiher_5_hailo_model_640x640.har
\[info\] Loading model script commands to yolo11l_640_300_Reiher_5 from string
\[info\] Found model with 3 input channels, using real RGB images for calibration instead of sampling random data.
\[info\] Starting Model Optimization
\[info\] Model received quantization params from the hn
\[info\] MatmulDecompose skipped
\[info\] Starting Mixed Precision
\[info\] Model Optimization Algorithm Mixed Precision is done (completion time is 00:00:01.62)
\[info\] LayerNorm Decomposition skipped
\[info\] Starting Statistics Collector
\[info\] Using dataset with 1100 entries for calibration
Calibration: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1100/1100 \[02:36<00:00,  7.02entries/s\]
\[info\] Model Optimization Algorithm Statistics Collector is done (completion time is 00:02:43.46)
\[info\] Starting Fix zp_comp Encoding
\[info\] Model Optimization Algorithm Fix zp_comp Encoding is done (completion time is 00:00:00.00)
\[info\] Starting Matmul Equalization
\[info\] Model Optimization Algorithm Matmul Equalization is done (completion time is 00:00:00.11)
\[info\] Starting MatmulDecomposeFix
\[info\] Model Optimization Algorithm MatmulDecomposeFix is done (completion time is 00:00:00.00)
\[info\] activation fitting started for yolo11l_640_300_Reiher_5/reduce_sum_softmax1/act_op
\[info\] No shifts available for layer yolo11l_640_300_Reiher_5/conv76/conv_op, using max shift instead. delta=0.3884
\[info\] No shifts available for layer yolo11l_640_300_Reiher_5/conv76/conv_op, using max shift instead. delta=0.1942
\[info\] activation fitting started for yolo11l_640_300_Reiher_5/reduce_sum_softmax2/act_op
\[info\] No shifts available for layer yolo11l_640_300_Reiher_5/conv80/conv_op, using max shift instead. delta=0.2619
\[info\] No shifts available for layer yolo11l_640_300_Reiher_5/conv80/conv_op, using max shift instead. delta=0.1309
\[info\] No shifts available for layer yolo11l_640_300_Reiher_5/conv156/conv_op, using max shift instead. delta=0.0446
\[info\] No shifts available for layer yolo11l_640_300_Reiher_5/conv156/conv_op, using max shift instead. delta=0.0223
\[info\] Finetune encoding skipped
\[info\] Bias Correction skipped
\[warning\] Dataset is larger than dataset_size in Adaround. Increasing the algorithm dataset size might improve the results
\[info\] Starting Adaround
\[info\] The algorithm Adaround will use up to 20.13 GB of storage space
\[info\] Using dataset with 256 entries for Adaround
\[info\] Using dataset with 64 entries for bias correction
Adaround:   1%|▍                                                                                 | 1/188 \[00:26<1:19:39, 25.56s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv1_output_0’\]WARNING: All log messages before absl::InitializeLog() is called are written to STDERR                                                                       | 0/40960 \[00:00<?, ?batches/s\]
I0000 00:00:1793224612.042407    3835 service.cc:148\] XLA service 0x77bcbcfe7380 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
I0000 00:00:1793224612.042509    3835 service.cc:156\]   StreamExecutor device (0): NVIDIA GeForce GTX 1080 Ti, Compute Capability 6.1
I0000 00:00:1793224612.973636    3835 device_compiler.h:188\] Compiled cluster using XLA!  This line is logged at most once for the lifetime of the process.
E0000 00:00:1793225064.384012    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv1_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   1%|▊                                                                               | 2/188 \[10:35<19:02:37, 368.59s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv2_output_0’\]\]
Training:  12%|████▋                                 | 4997/40960 \[01:27<08:16, 72.48batches/s, round_loss: 0.0000 - annealing_b: 21.7639\]
Training:  12%|████                             | 5012/40960 \[01:27<08:17, 72.30batches/s, round_loss: 0.0000 - annealing_b: 21.7556E0000 00:00:1793225799.925430    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv2_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   2%|█▎                                                                              | 3/188 \[22:45<27:27:32, 534.34s/blockAdaround:   2%|▉                                                            | 3/188 \[22:46<27:27:32, 534.34s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv_feature_splitter1_1_output_0’\]\]                                                                              E0000 00:00:1793226243.486377    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv_feature_splitter1_1_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   2%|█▎                                                           | 4/188 \[29:50<25:05:18, 490.86s/blocks, Layers=\['yolo11lAdaround:   2%|█▎                                                           | 4/188 \[29:50<25:05:18, 490.86s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv_feature_splitter1_2_output_0’\]\]                                                                              E0000 00:00:1793226671.025963    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv_feature_splitter1_2_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   3%|█▌                                                           | 5/188 \[36:57<23:47:53, 468.16s/blocks, Layers=\['yolo11lAdaround:   3%|██▏                                                                             | 5/188 \[36:58<23:47:53, 468.16s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv4_output_0’\]\]                                                                              E0000 00:00:1793226939.885737    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv4_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   3%|██▌                                                                             | 6/188 \[41:17<20:04:40, 397.14s/blockAdaround:   3%|██▌                                                                             | 6/188 \[41:18<20:04:40, 397.14s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv5_output_0’\]\]                                                                              E0000 00:00:1793227198.584044    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv5_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   4%|██▉                                                                             | 7/188 \[45:36<17:41:46, 351.97s/blockAdaround:   4%|██▉                                                                             | 7/188 \[45:37<17:41:46, 351.97s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv6_output_0’\]\]                                                                              E0000 00:00:1793227406.311311    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv6_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   4%|███▍                                                                            | 8/188 \[49:00<15:14:33, 304.85s/blockAdaround:   4%|███▍                                                                            | 8/188 \[49:01<15:14:33, 304.85s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv7_output_0’\]\]                                                                              E0000 00:00:1793227610.667003    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv7_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   5%|███▊                                                                            | 9/188 \[52:25<13:36:32, 273.70s/blockAdaround:   5%|███▊                                                                            | 9/188 \[52:26<13:36:32, 273.70s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv8_output_0’\]\]                                                                              E0000 00:00:1793227873.263176    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv8_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Adaround:   5%|████▏                                                                          | 10/188 \[56:52<13:25:31, 271.53s/blockAdaround:   5%|████▏                                                                          | 10/188 \[56:52<13:25:31, 271.53s/blocks, Layers=\[‘yolo11l_640_300_Reiher_5/conv9_output_0’\]\]                                                                              E0000 00:00:1793228083.996174    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inyolo11l_640_300_Reiher_5_submodel_1/conv9_1/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
\[info\] Model Optimization Algorithm Adaround is done (completion time is 10:37:06.85)
\[info\] Quantization-Aware Fine-Tuning skipped
\[info\] Starting Layer Noise Analysis
\[info\] Using only 10 images for calibration instead of 16, because 16 is not an integer product of the batch size 10.
Full Quant Analysis:   0%|                                                                             | 0/1 \[00:00<?, ?iterations/s\]E0000 00:00:1793262873.570519    3721 meta_optimizer.cc:966\] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inlat_model_1/normalization1_5/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
\[warning\] GPU memory has been exhausted. Layer Noise Analysis will not generate statistics. Try either:1) Lower batch size using the command: model_optimization_config(checker_cfg, batch_size=1). 2) Disable the algorithm using the command: model_optimization_config(checker_cfg, policy=disabled). 3) Force using CPU by setting the CUDA_VISIBLE_DEVICES environment variable to non-exsits GPU
Full Quant Analysis:   0%|                                                                             | 0/1 \[04:35<?, ?iterations/s\]
\[info\] Model Optimization Algorithm Layer Noise Analysis is done (completion time is 00:04:43.28)
\[info\] Model Optimization is done
\[info\] Saved HAR to: /local/workspace/shared_with_docker/yolo11l_640_300_Reiher_5_quantized_optimized_model_640x640_1100_10_3_0.har
Quantized HAR file saved to: /local/workspace/shared_with_docker/yolo11l_640_300_Reiher_5_quantized_optimized_model_640x640_1100_10_3_0.har

I deleted most of the adaround lines or else i couldn’t upload it

2nd half:

\[info\] ParsedPerformanceParam command, setting optimization_level(max=2)
\[info\] Loading model script commands to yolo11l_640_300_Reiher_5 from string
\[info\] ParsedPerformanceParam command, setting optimization_level(max=2)
\[info\] ClientRunner initialized successfully.
\[info\] Loading network parameters
\[info\] Starting Hailo allocation and compilation flow
\[info\] Adding an output layer after conv117
\[info\] Adding an output layer after conv120
\[info\] Adding an output layer after conv140
\[info\] Adding an output layer after conv143
\[info\] Adding an output layer after conv162
\[info\] Adding an output layer after conv165
\[info\] Building optimization options for network layers…
\[info\] Successfully built optimization options - 1m 50s 997ms
\[info\] Trying to compile the network in a single context
\[info\] Single context flow failed: Recoverable single context error
\[info\] Building optimization options for network layers…
\[info\] Successfully built optimization options - 2m 4s 982ms
\[info\] Using Multi-context flow
\[info\] Resources optimization params: max_control_utilization=100%, max_compute_utilization=100%, max_compute_16bit_utilization=100%, max_memory_utilization (weights)=85%, max_input_aligner_utilization=100%, max_apu_utilization=100%
\[info\] Finding the best partition to contexts…
\[…<==>…\] Duration: 03:06:04
Found valid partition to 4 contexts
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:21:10
Found valid partition to 4 contexts, Performance improved by 0.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:29
Found valid partition to 4 contexts, Performance improved by 0.1%
\[info\] Searching for a better partition…
\[…<==>…\] Elapsed: 00:24:46                                                                         \[…<==>…\] Elapsed: 00:24:46                                                                         \[…<==>…\] Elapsed: 00:24:46                                                                         \[…<==>…\] Elapsed: 00:27:34
\[info\] Partition to contexts finished successfully
\[info\] Partitioner finished after 397 iterations, Time it took: 3h 56m 22s 560ms
\[info\] Applying selected partition to 4 contexts…
\[info\] Validating layers feasibility

Validating yolo11l_640_300_Reiher_5_context_0 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finished

Validating yolo11l_640_300_Reiher_5_context_1 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finished

Validating yolo11l_640_300_Reiher_5_context_2 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finished

Validating yolo11l_640_300_Reiher_5_context_3 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finished

\[info\] Layers feasibility validated successfully
\[info\] Running resources allocation (mapping) flow, time per context: 9m 59s
Context:0/3 Iteration 4: Trying parallel mapping…
cluster_0  cluster_1  cluster_2  cluster_3  cluster_4  cluster_5  cluster_6  cluster_7  prepost
worker0  V          V          V          V          V          V          V          V          V
worker1  \*          \*          \*          \*          \*          \*          \*          \*          V
worker2  \*          \*          \*          \*          \*          \*          \*          \*          V
worker3  \*          \*          \*          \*          \*          \*          \*          \*          V
Context:1/3 Iteration 12: Trying parallel mapping…
cluster_0  cluster_1  cluster_2  cluster_3  cluster_4  cluster_5  cluster_6  cluster_7  prepost
worker0  \*          \*          \*          \*          \*          \*          \*          \*          V
worker1
worker2  \*          \*          \*          \*          \*          \*          \*          \*          V
worker3  \*          \*          \*          \*          \*          \*          \*          \*          V

10:03
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 8
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_0 (yolo11l_640_300_Reiher_5_context_0):
Iterations: 4
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 0
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_1 (yolo11l_640_300_Reiher_5_context_1):
Iterations: 12
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 11
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_2 (yolo11l_640_300_Reiher_5_context_2):
Iterations: 0 \[ Did not run due to an error \]
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 0
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_3 (yolo11l_640_300_Reiher_5_context_3):
Iterations: 0 \[ Did not run due to an error \]
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 0
Reverts on split failed: 0
\[error\] Mapping Failed (Timeout, allocation time: 4h 12m 37s)
\[info\] Building optimization options for network layers…
\[info\] Successfully built optimization options - 2m 8s 345ms
\[info\] Using Multi-context flow
\[info\] Resources optimization params: max_control_utilization=90%, max_compute_utilization=90%, max_compute_16bit_utilization=90%, max_memory_utilization (weights)=85%, max_input_aligner_utilization=90%, max_apu_utilization=90%
\[info\] Finding the best partition to contexts…
\[…<==>…\] Duration: 00:12:14
Found valid partition to 3 contexts
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:02:39
Found valid partition to 3 contexts, Performance improved by 18.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:03:46
Found valid partition to 3 contexts, Performance improved by 10.4%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:04:01
Found valid partition to 3 contexts, Performance improved by 3.5%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:04:04
Found valid partition to 3 contexts, Performance improved by 0.1%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:57
Found valid partition to 3 contexts, Performance improved by 3.4%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:43
Found valid partition to 3 contexts, Performance improved by 1.1%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:51:03
Found valid partition to 3 contexts, Performance improved by 1.0%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:02:09
Found valid partition to 4 contexts, Performance improved by 21.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:14
Found valid partition to 4 contexts, Performance improved by 0.8%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:02:26
Found valid partition to 4 contexts, Performance improved by 0.6%
\[info\] Searching for a better partition…
\[…<==>..\] Duration: 00:02:20
Found valid partition to 4 contexts, Performance improved by 3.1%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:02:31
Found valid partition to 4 contexts, Performance improved by 0.9%
\[info\] Searching for a better partition…
\[..<==>…\] Duration: 00:02:55
Found valid partition to 4 contexts, Performance improved by 1.7%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:03:05
Found valid partition to 4 contexts, Performance improved by 1.7%
\[info\] Searching for a better partition…
\[…<==>.\] Duration: 00:02:59
Found valid partition to 4 contexts, Performance improved by 9.1%
\[info\] Searching for a better partition…
\[.<==>…\] Duration: 00:04:34
Found valid partition to 4 contexts, Performance improved by 0.2%
\[info\] Searching for a better partition…
\[.<==>…\] Duration: 00:01:08
Found valid partition to 4 contexts, Performance improved by 0.3%
\[info\] Searching for a better partition…
\[..<==>…\] Elapsed: 00:28:34
\[info\] Partition to contexts finished successfully
\[info\] Partitioner finished after 278 iterations, Time it took: 2h 15m 49s 95ms
\[info\] Applying selected partition to 4 contexts…
\[info\] Validating layers feasibility

Validating yolo11l_640_300_Reiher_5_context_0 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finishedconv35_to_conv36_d8-11_11040_w_from_conv19_sd0-2_to_conv19_sdc5_to_conv36_d4-7_11032_sh__17027rom_conv36_d6-8_to_conv36

Validating yolo11l_640_300_Reiher_5_context_1 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finishedation_ew_sub_softmax2_sd0640_300_Reiher_5_context_0_to_yolo11l_640_300_Reiher_5_context_1_16999

Validating yolo11l_640_300_Reiher_5_context_2 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finishedd2nv136_dc_to_conv138_conv137_d0-2_17029-2_17029_to_conv137_d0-2_17030_Reiher_5_context_2_17013

Validating yolo11l_640_300_Reiher_5_context_3 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finished640_300_Reiher_5_yolo11l_640_300_Reiher_5_context_2_to_yolo11l_640_300_Reiher_5_context_3_17022


                                                                                              [info] Layers feasibility validated successfully


\[info\] Running resources allocation (mapping) flow, time per context: 9m 59s
Context:0/3 Iteration 4: Trying parallel mapping…
cluster_0  cluster_1  cluster_2  cluster_3  cluster_4  cluster_5  cluster_6  cluster_7  prepost
worker0  \*          \*          \*          \*          \*          \*          \*          \*          V
worker1  V          V          V          V          V          V          V          V          V
worker2  \*          \*          \*          \*          \*          \*          \*          \*          V
worker3  \*          \*          \*          \*          \*          \*          \*          \*          V
Context:1/3 Iteration 20: Trying parallel mapping…
cluster_0  cluster_1  cluster_2  cluster_3  cluster_4  cluster_5  cluster_6  cluster_7  prepost
worker0  \*          \*          \*          \*          \*          \*          \*          \*          V
worker1
worker2  \*          \*          \*          \*          \*          \*          \*          \*          V
worker3  \*          \*          \*          \*          \*          \*          \*          \*          V

10:20
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 5
Reverts on pre-mapping validation: 10
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_0 (yolo11l_640_300_Reiher_5_context_0):
Iterations: 4
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 1
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_1 (yolo11l_640_300_Reiher_5_context_1):
Iterations: 20
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 6
Reverts on pre-mapping validation: 12
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_2 (yolo11l_640_300_Reiher_5_context_2):
Iterations: 0 \[ Did not run due to an error \]
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 0
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_3 (yolo11l_640_300_Reiher_5_context_3):
Iterations: 0 \[ Did not run due to an error \]
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 0
Reverts on split failed: 0
\[error\] Mapping Failed (Timeout, allocation time: 2h 30m 44s)
\[info\] Building optimization options for network layers…
\[info\] Successfully built optimization options - 2m 9s 827ms
\[info\] Using Multi-context flow
\[info\] Resources optimization params: max_control_utilization=80%, max_compute_utilization=80%, max_compute_16bit_utilization=80%, max_memory_utilization (weights)=80%, max_input_aligner_utilization=80%, max_apu_utilization=80%
\[info\] Finding the best partition to contexts…
\[…<==>…\] Duration: 00:01:21
Found valid partition to 3 contexts
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:19
Found valid partition to 3 contexts, Performance improved by 8.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:06:28
Found valid partition to 3 contexts, Performance improved by 27.4%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:41:17
Found valid partition to 3 contexts, Performance improved by 6.4%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:22
Found valid partition to 3 contexts, Performance improved by 1.4%
\[info\] Searching for a better partition…
\[…<==>…\] Elapsed: 00:08:23                                                                         \[…<==>…\] Elapsed: 00:08:23                                                                         \[…<==>…\] Duration: 00:13:22
Found valid partition to 4 contexts, Performance improved by 0.6%
\[info\] Searching for a better partition…
\[.<==>…\] Duration: 00:02:01
Found valid partition to 4 contexts, Performance improved by 10.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:38
Found valid partition to 4 contexts, Performance improved by 1.8%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:02:23
Found valid partition to 4 contexts, Performance improved by 0.0%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:38
Found valid partition to 4 contexts, Performance improved by 0.4%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:45
Found valid partition to 4 contexts, Performance improved by 1.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:47
Found valid partition to 4 contexts, Performance improved by 0.5%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:54
Found valid partition to 4 contexts, Performance improved by 10.6%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:46
Found valid partition to 4 contexts, Performance improved by 0.2%
\[info\] Searching for a better partition…
\[…<==>.\] Duration: 00:00:49
Found valid partition to 4 contexts, Performance improved by 4.6%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:10
Found valid partition to 4 contexts, Performance improved by 0.5%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:56
Found valid partition to 4 contexts, Performance improved by 5.1%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:47
Found valid partition to 4 contexts, Performance improved by 1.9%
\[info\] Searching for a better partition…
\[.<==>…\] Duration: 00:00:53
Found valid partition to 4 contexts, Performance improved by 0.8%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:50
Found valid partition to 4 contexts, Performance improved by 0.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:47
Found valid partition to 4 contexts, Performance improved by 0.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:46
Found valid partition to 4 contexts, Performance improved by 0.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:29
Found valid partition to 4 contexts, Performance improved by 0.5%
\[info\] Searching for a better partition…
\[..<==>…\] Duration: 00:02:24
Found valid partition to 4 contexts, Performance improved by 1.3%
\[info\] Searching for a better partition…
\[…<==>.\] Duration: 00:08:27
Found valid partition to 4 contexts, Performance improved by 1.4%
\[info\] Searching for a better partition…
\[…<==>.\] Elapsed: 00:00:26
\[info\] Partition to contexts finished successfully
\[info\] Partitioner finished after 240 iterations, Time it took: 1h 37m 23s 289ms
\[info\] Applying selected partition to 4 contexts…
\[info\] Validating layers feasibility

Validating yolo11l_640_300_Reiher_5_context_0 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finished_from_conv36_d3-5_to_conv36_dcdcm_conv36_d0-2_to_conv36_dc_concat_f_from_conv36_d3-5_to_conv36_dc_concat_f_from_conv36\_

Validating yolo11l_640_300_Reiher_5_context_1 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finishedsh_from_conv52_dc_to_conv53_d0-3_23002_to_conv53_d0-2_2300511l_640_300_Reiher_5_context_1_22981

Validating yolo11l_640_300_Reiher_5_context_2 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finishedd0rom_conv114_sd0-1_to_conv114_sdceiher_5_context_0_to_yolo11l_640_300_Reiher_5_context_2_22976

Validating yolo11l_640_300_Reiher_5_context_3 layer by layer (100%)

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

* * * * * * * * * * * * * * * * * * * * 

● Finished640_300_Reiher_5_yolo11l_640_300_Reiher_5_context_2_to_yolo11l_640_300_Reiher_5_context_3_22992f_from_conv137_d6-8_to_c

                                                                                                                      [info] Layers feasibility validated successfully


\[info\] Running resources allocation (mapping) flow, time per context: 9m 59s
Context:0/3 Iteration 4: Trying parallel mapping…
cluster_0  cluster_1  cluster_2  cluster_3  cluster_4  cluster_5  cluster_6  cluster_7  prepost
worker0  \*          \*          \*          \*          \*          \*          \*          \*          V
worker1  V          V          V          V          V          V          V          V          V
worker2  \*          \*          \*          \*          \*          \*          \*          \*          V
worker3  \*          \*          \*          \*          \*          \*          \*          \*          V
Context:1/3 Iteration 4: Trying parallel mapping…
cluster_0  cluster_1  cluster_2  cluster_3  cluster_4  cluster_5  cluster_6  cluster_7  prepost
worker0  \*          \*          \*          \*          \*          \*          \*          \*          V
worker1  \*          \*          \*          \*          \*          \*          \*          \*          V
worker2  V          V          V          V          V          V          V          V          V
worker3  \*          \*          \*          \*          \*          \*          \*          \*          V
Context:2/3 Iteration 24: Trying parallel mapping…
cluster_0  cluster_1  cluster_2  cluster_3  cluster_4  cluster_5  cluster_6  cluster_7  prepost
worker0  V          V          V          V          V          V          V          V          V
worker1  \*          \*          \*          \*          \*          \*          \*          \*          V
worker2  \*          \*          \*          \*          \*          \*          \*          \*          V
worker3  \*          \*          \*          \*          \*          \*          \*          \*          V
Context:3/3 Iteration 4: Trying parallel mapping…
cluster_0  cluster_1  cluster_2  cluster_3  cluster_4  cluster_5  cluster_6  cluster_7  prepost
worker0  \*          \*          \*          \*          \*          \*          \*          \*          V
worker1  V          V          V          V          V          V          V          V          V
worker2  \*          \*          \*          \*          \*          \*          \*          \*          V
worker3  \*          \*          \*          \*          \*          \*          \*          \*          V

01:33
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 0
Reverts on split failed: 0

3nd half:

\[info\] yolo11l_640_300_Reiher_5_context_0 (yolo11l_640_300_Reiher_5_context_0):
Iterations: 4
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 1
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_1 (yolo11l_640_300_Reiher_5_context_1):
Iterations: 4
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 1
Reverts on pre-mapping validation: 1
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_2 (yolo11l_640_300_Reiher_5_context_2):
Iterations: 24
Reverts on cluster mapping: 4
Reverts on inter-cluster connectivity: 13
Reverts on pre-mapping validation: 3
Reverts on split failed: 0
\[info\] yolo11l_640_300_Reiher_5_context_3 (yolo11l_640_300_Reiher_5_context_3):
Iterations: 4
Reverts on cluster mapping: 0
Reverts on inter-cluster connectivity: 0
Reverts on pre-mapping validation: 1
Reverts on split failed: 0
\[info\] Building optimization options for network layers…
\[info\] Successfully built optimization options - 2m 10s 624ms
\[info\] Using Multi-context flow
\[info\] Resources optimization params: max_control_utilization=70%, max_compute_utilization=70%, max_compute_16bit_utilization=70%, max_memory_utilization (weights)=70%, max_input_aligner_utilization=70%, max_apu_utilization=70%
\[info\] Finding the best partition to contexts…
\[…<==>…\] Duration: 00:01:17
Found valid partition to 4 contexts
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:05:42
Found valid partition to 4 contexts, Performance improved by 57.2%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:02:38
Found valid partition to 4 contexts, Performance improved by 18.1%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:05:48
Found valid partition to 4 contexts, Performance improved by 14.1%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:03:38
Found valid partition to 4 contexts, Performance improved by 1.2%
\[info\] Searching for a better partition…
\[…  \] Duration: 00:07:41
Found valid partition to 4 contexts, Performance improved by 0.8%
\[info\] Searching for a better partition… Elapsed: 00:00:00
\[…<==>…\] Duration: 00:01:53
Found valid partition to 4 contexts, Performance improved by 3.6%
\[info\] Searching for a better partition…
\[…<==>…\] Elapsed: 00:00:52                                                                              \[…<==>…\] Elapsed: 00:00:52                                                                    \[…<==>…\] Duration: 00:06:30
Found valid partition to 4 contexts, Performance improved by 13.9%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:48
Found valid partition to 4 contexts, Performance improved by 2.6%
\[info\] Searching for a better partition…
\[<==>…\] Duration: 00:01:31
Found valid partition to 4 contexts, Performance improved by 1.1%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:01:50
Found valid partition to 4 contexts, Performance improved by 0.1%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:03:38
Found valid partition to 4 contexts, Performance improved by 1.5%
\[info\] Searching for a better partition…
\[…<==>.\] Elapsed: 00:00:33
\[info\] Partition to contexts finished successfully
\[info\] Partitioner finished after 195 iterations, Time it took: 44m 44s 962ms
\[info\] Applying selected partition to 4 contexts…
\[info\] Building optimization options for network layers…
\[info\] Successfully built optimization options - 2m 9s 821ms
\[info\] Using Multi-context flow
\[info\] Resources optimization params: max_control_utilization=60%, max_compute_utilization=60%, max_compute_16bit_utilization=60%, max_memory_utilization (weights)=60%, max_input_aligner_utilization=60%, max_apu_utilization=60%
\[info\] Finding the best partition to contexts…
\[…<==>…\] Duration: 00:01:18
Found valid partition to 4 contexts
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:56
Found valid partition to 4 contexts, Performance improved by 0.7%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:02:03
Found valid partition to 4 contexts, Performance improved by 16.3%
\[info\] Searching for a better partition…
\[…<==>…\] Elapsed: 00:01:38                                                                         \[…<==>…\] Elapsed: 00:01:38                                                                         \[…<==>…\] Duration: 00:01:55
Found valid partition to 4 contexts, Performance improved by 0.4%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:04:21
Found valid partition to 4 contexts, Performance improved by 4.9%
\[info\] Searching for a better partition…
\[…<==>\] Duration: 00:03:06
Found valid partition to 4 contexts, Performance improved by 0.7%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:03:03
Found valid partition to 4 contexts, Performance improved by 0.6%
\[info\] Searching for a better partition…
\[..<==>…\] Duration: 00:02:55
Found valid partition to 4 contexts, Performance improved by 1.7%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:00:55
Found valid partition to 4 contexts, Performance improved by 2.4%
\[info\] Searching for a better partition…
\[…<==>…\] Duration: 00:04:24
Found valid partition to 4 contexts, Performance improved by 5.9%
\[info\] Searching for a better partition…
\[…<==>…\] Elapsed: 00:12:50
\[info\] Partition to contexts finished successfully
\[info\] Partitioner finished after 146 iterations, Time it took: 38m 1s 761ms
\[info\] Applying selected partition to 4 contexts…
\[info\] yolo11l_640_300_Reiher_5_context_0 utilization:
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | Cluster   | Control Utilization | Compute Utilization | Memory Utilization |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | cluster_0 | 62.5%               | 51.6%               | 87.5%              |
\[info\] | cluster_1 | 75%                 | 68.8%               | 84.4%              |
\[info\] | cluster_2 | 87.5%               | 50%                 | 66.4%              |
\[info\] | cluster_3 | 100%                | 57.8%               | 79.7%              |
\[info\] | cluster_4 | 87.5%               | 60.9%               | 53.1%              |
\[info\] | cluster_5 | 68.8%               | 54.7%               | 48.4%              |
\[info\] | cluster_6 | 75%                 | 35.9%               | 45.3%              |
\[info\] | cluster_7 | 81.3%               | 71.9%               | 93%                |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | Total     | 79.7%               | 56.4%               | 69.7%              |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] yolo11l_640_300_Reiher_5_context_1 utilization:
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | Cluster   | Control Utilization | Compute Utilization | Memory Utilization |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | cluster_0 | 87.5%               | 73.4%               | 87.5%              |
\[info\] | cluster_1 | 50%                 | 12.5%               | 23.4%              |
\[info\] | cluster_2 | 100%                | 28.1%               | 68.8%              |
\[info\] | cluster_3 | 87.5%               | 28.1%               | 55.5%              |
\[info\] | cluster_4 | 100%                | 96.9%               | 88.3%              |
\[info\] | cluster_5 | 62.5%               | 31.3%               | 39.8%              |
\[info\] | cluster_6 | 87.5%               | 64.1%               | 78.1%              |
\[info\] | cluster_7 | 81.3%               | 57.8%               | 93%                |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | Total     | 82%                 | 49%                 | 66.8%              |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] yolo11l_640_300_Reiher_5_context_2 utilization:
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | Cluster   | Control Utilization | Compute Utilization | Memory Utilization |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | cluster_0 | 93.8%               | 92.2%               | 66.4%              |
\[info\] | cluster_1 | 87.5%               | 89.1%               | 68%                |
\[info\] | cluster_2 | 62.5%               | 45.3%               | 50.8%              |
\[info\] | cluster_3 | 81.3%               | 79.7%               | 81.3%              |
\[info\] | cluster_4 | 68.8%               | 50%                 | 46.9%              |
\[info\] | cluster_5 | 81.3%               | 76.6%               | 68.8%              |
\[info\] | cluster_6 | 81.3%               | 73.4%               | 86.7%              |
\[info\] | cluster_7 | 100%                | 95.3%               | 69.5%              |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | Total     | 82%                 | 75.2%               | 67.3%              |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] yolo11l_640_300_Reiher_5_context_3 utilization:
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | Cluster   | Control Utilization | Compute Utilization | Memory Utilization |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | cluster_0 | 81.3%               | 43.8%               | 51.6%              |
\[info\] | cluster_1 | 37.5%               | 25%                 | 32%                |
\[info\] | cluster_2 | 75%                 | 64.1%               | 85.9%              |
\[info\] | cluster_3 | 87.5%               | 92.2%               | 94.5%              |
\[info\] | cluster_4 | 87.5%               | 57.8%               | 70.3%              |
\[info\] | cluster_5 | 93.8%               | 71.9%               | 68%                |
\[info\] | cluster_6 | 75%                 | 85.9%               | 79.7%              |
\[info\] | cluster_7 | 100%                | 89.1%               | 82%                |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] | Total     | 79.7%               | 66.2%               | 70.5%              |
\[info\] ±----------±--------------------±--------------------±-------------------+
\[info\] Successful Mapping (allocation time: 41m 57s)
\[info\] Compiling kernels of yolo11l_640_300_Reiher_5_context_0…
\[info\] Compiling kernels of yolo11l_640_300_Reiher_5_context_1…
\[info\] Compiling kernels of yolo11l_640_300_Reiher_5_context_2…
\[info\] Compiling kernels of yolo11l_640_300_Reiher_5_context_3…
\[info\] Bandwidth of model inputs: 9.375 Mbps, outputs: 4.74243 Mbps (for a single frame)
\[info\] Bandwidth of DDR buffers: 40.625 Mbps (for a single frame)
\[info\] Bandwidth of inter context tensors: 131.25 Mbps (for a single frame)
\[info\] Building HEF…
\[info\] Successful Compilation (compilation time: 59s)
\[info\] Compilation completed successfully.
Compiled HEF saved to: /local/workspace/shared_with_docker/yolo11l_640_300_Reiher_5_Finished_640x640_1100_10_3_0.hef

And here are the most Important Scripts I’m using for the compilation Process:
Create_Calibration_Images

from PIL import Image
import json
import os
from tqdm import tqdm
import random


def resize_and_pad(img, target_w, target_h):
    """Fit the full image into the target size and pad the remaining area."""
    ratio = min(target_w / img.width, target_h / img.height)
    new_width = round(img.width * ratio)
    new_height = round(img.height * ratio)

    resized_img = img.resize((new_width, new_height), Image.Resampling.LANCZOS)
    canvas = Image.new("RGB", (target_w, target_h), (114, 114, 114))
    left = (target_w - new_width) // 2
    top = (target_h - new_height) // 2
    canvas.paste(resized_img, (left, top))

    return canvas


def find_image_files(directory, extensions):
    """Find all image files with specified extensions in directory and its subdirectories."""
    image_files = []

    for root, _, files in os.walk(directory):
        for file in files:
            if any(file.lower().endswith(ext.lower()) for ext in extensions):
                image_files.append(os.path.join(root, file))

    return image_files


class CalibrationImageCreator:
    def __init__(self, image_dir, output_dir, image_size,
                num_images, input_image_extensions):
        self.image_dir = image_dir
        self.output_dir = output_dir
        self.image_size = image_size
        self.num_images = num_images
        self.input_image_extensions = input_image_extensions

    def create_calibration_images(self):
        #target_dir_path = os.path.join(self.dataset_dir, "calib_images")
        os.makedirs(self.output_dir, exist_ok=True)
        metadata_path = os.path.join(self.output_dir, ".calibration_images_config.json")
        if os.path.exists(metadata_path):
            os.remove(metadata_path)

        #target_dataset_dir = os.path.join(self.dataset_dir, "images")
        print(f"Searching for images in {self.image_dir}...")
        all_image_paths = find_image_files(self.image_dir, self.input_image_extensions)

        if not all_image_paths:
            print(f"No images found in {self.image_dir} with extensions {self.input_image_extensions}")
            return

        print(f"Found {len(all_image_paths)} images")
        random.shuffle(all_image_paths)
        images_list = all_image_paths[:self.num_images]

        actual_num_images = len(images_list)
        if actual_num_images < self.num_images:
            print(f"Warning: Only found {actual_num_images} images, less than the requested {self.num_images}")

        print("Creating calibration images for Hailo export")
        created_count = 0
        for idx, filepath in tqdm(enumerate(images_list), total=actual_num_images):
            try:
                with Image.open(filepath) as img:
                    img = img.convert("RGB")
                    processed_img = resize_and_pad(img, self.image_size[0], self.image_size[1])
                    output_filepath = os.path.join(self.output_dir, f"processed_{idx}.jpg")
                    processed_img.save(output_filepath, format="JPEG")
                    created_count += 1
            except Exception as e:
                print(f"Error processing {filepath}: {e}")

        with open(metadata_path, "w", encoding="utf-8") as metadata_file:
            json.dump(
                {
                    "resize_mode": "letterbox",
                    "image_size": list(self.image_size),
                    "requested_num_images": self.num_images,
                    "created_num_images": created_count,
                    "padding_color": [114, 114, 114],
                },
                metadata_file,
            )

Create_Calibration_Data

import json
import os

import numpy as np
from PIL import Image


class CalibrationDataProcessor:
    FLOAT32_CHUNK_SIZE = 64

    def __init__(self, image_dir, output_dir, image_size):
        self.image_dir = image_dir
        self.output_dir = output_dir
        self.image_size = image_size
        self.input_image_extensions = (".jpg", ".jpeg", ".png")

    @staticmethod
    def _available_memory_bytes():
        available_bytes = None
        try:
            with open("/proc/meminfo", encoding="utf-8") as memory_info:
                for line in memory_info:
                    if line.startswith("MemAvailable:"):
                        available_bytes = int(line.split()[1]) * 1024
                        break
        except (OSError, ValueError):
            pass

        if available_bytes is None:
            try:
                available_bytes = (
                    os.sysconf("SC_AVPHYS_PAGES") * os.sysconf("SC_PAGE_SIZE")
                )
            except (OSError, ValueError, AttributeError):
                return 0

        cgroup_limits = (
            ("/sys/fs/cgroup/memory.max", "/sys/fs/cgroup/memory.current"),
            (
                "/sys/fs/cgroup/memory/memory.limit_in_bytes",
                "/sys/fs/cgroup/memory/memory.usage_in_bytes",
            ),
        )
        for limit_path, usage_path in cgroup_limits:
            try:
                with open(limit_path, encoding="utf-8") as limit_file:
                    limit_value = limit_file.read().strip()
                with open(usage_path, encoding="utf-8") as usage_file:
                    usage_bytes = int(usage_file.read().strip())
                if limit_value == "max":
                    continue

                limit_bytes = int(limit_value)
                if 0 < limit_bytes < 2**60:
                    available_bytes = min(
                        available_bytes,
                        max(0, limit_bytes - usage_bytes),
                    )
                break
            except (OSError, ValueError):
                continue

        return available_bytes

    def _write_float64_dataset(
        self,
        image_names,
        normalized_path,
        processed_path,
        completion_marker_path,
        array_shape,
    ):
        calibration_data = []
        for image_name in image_names:
            image_path = os.path.join(self.image_dir, image_name)
            with Image.open(image_path) as image:
                image = image.convert("RGB").resize(self.image_size)
                calibration_data.append(np.asarray(image) / 255.0)

        calibration_data_normalized = np.asarray(calibration_data)
        np.save(normalized_path, calibration_data_normalized)
        calibration_data_processed = calibration_data_normalized * 255.0
        np.save(processed_path, calibration_data_processed)

        with open(completion_marker_path, "w", encoding="utf-8") as marker_file:
            json.dump(
                {
                    "image_count": len(image_names),
                    "shape": array_shape,
                    "dtype": str(calibration_data_normalized.dtype),
                    "method": "float64",
                },
                marker_file,
            )

    def _write_chunked_float32_dataset(
        self,
        image_names,
        normalized_path,
        processed_path,
        completion_marker_path,
        array_shape,
    ):
        normalized_temp_path = f"{normalized_path}.tmp.npy"
        processed_temp_path = f"{processed_path}.tmp.npy"
        normalized_data = np.lib.format.open_memmap(
            normalized_temp_path,
            mode="w+",
            dtype=np.float32,
            shape=array_shape,
        )
        processed_data = np.lib.format.open_memmap(
            processed_temp_path,
            mode="w+",
            dtype=np.float32,
            shape=array_shape,
        )

        chunk_size = self.FLOAT32_CHUNK_SIZE
        for chunk_start in range(0, len(image_names), chunk_size):
            chunk_end = min(chunk_start + chunk_size, len(image_names))
            chunk_shape = (
                chunk_end - chunk_start,
                self.image_size[1],
                self.image_size[0],
                3,
            )
            image_batch = np.empty(chunk_shape, dtype=np.uint8)
            for batch_index, image_name in enumerate(image_names[chunk_start:chunk_end]):
                image_path = os.path.join(self.image_dir, image_name)
                with Image.open(image_path) as image:
                    image = image.convert("RGB").resize(self.image_size)
                    image_batch[batch_index] = np.asarray(image, dtype=np.uint8)

            normalized_batch = image_batch.astype(np.float32)
            normalized_batch /= np.float32(255.0)
            normalized_data[chunk_start:chunk_end] = normalized_batch
            processed_data[chunk_start:chunk_end] = image_batch

        normalized_data.flush()
        processed_data.flush()
        del normalized_data, processed_data
        os.replace(normalized_temp_path, normalized_path)
        os.replace(processed_temp_path, processed_path)

        with open(completion_marker_path, "w", encoding="utf-8") as marker_file:
            json.dump(
                {
                    "image_count": len(image_names),
                    "shape": array_shape,
                    "dtype": "float32",
                    "method": "chunked_float32",
                },
                marker_file,
            )

    def create_calibration_dataset(self):
        os.makedirs(self.output_dir, exist_ok=True)
        calibration_data_path = os.path.join(self.output_dir, "calibration_data_normalized.npy")
        processed_data_path = os.path.join(self.output_dir, "calibration_data_processed.npy")
        completion_marker_path = os.path.join(
            self.output_dir,
            ".calibration_data_complete.json",
        )
        if os.path.exists(completion_marker_path):
            os.remove(completion_marker_path)

        image_names = sorted(
            image_name
            for image_name in os.listdir(self.image_dir)
            if image_name.lower().endswith(self.input_image_extensions)
            and os.path.isfile(os.path.join(self.image_dir, image_name))
        )
        if not image_names:
            raise ValueError(f"No calibration images found in {self.image_dir}")

        print("Creating calibration datasets for Hailo export")
        image_count = len(image_names)
        array_shape = (
            image_count,
            self.image_size[1],
            self.image_size[0],
            3,
        )
        available_bytes = self._available_memory_bytes()
        array_bytes = int(np.prod(array_shape)) * np.dtype(np.float64).itemsize
        estimated_float64_peak = 3 * array_bytes + 256 * 1024**2
        float32_chunk_pixels = (
            min(image_count, self.FLOAT32_CHUNK_SIZE)
            * self.image_size[1]
            * self.image_size[0]
            * 3
        )
        float32_array_bytes = int(np.prod(array_shape)) * np.dtype(np.float32).itemsize
        estimated_float32_peak = (
            2 * float32_array_bytes
            + float32_chunk_pixels * (1 + 4 + 4)
            + 256 * 1024**2
        )
        use_float64 = estimated_float64_peak <= available_bytes

        gib = 1024**3
        print(
            f"Available memory: {available_bytes / gib:.2f} GiB; "
            f"Estimated float64 peak: {estimated_float64_peak / gib:.2f} GiB; "
            f"Estimated float32 peak: {estimated_float32_peak / gib:.2f} GiB"
        )
        if use_float64:
            print("Using in-memory float64 calibration processing")
            self._write_float64_dataset(
                image_names,
                calibration_data_path,
                processed_data_path,
                completion_marker_path,
                array_shape,
            )
        else:
            print("Using chunked float32 calibration processing")
            self._write_chunked_float32_dataset(
                image_names,
                calibration_data_path,
                processed_data_path,
                completion_marker_path,
                array_shape,
            )

        print(
            f"Normalized calibration dataset saved with shape: "
            f"{array_shape} to {calibration_data_path}"
        )
        print(
            f"Processed calibration dataset saved with shape: "
            f"{array_shape} to {processed_data_path}"
        )

ONNX_Parser

import os
from hailo_sdk_client import ClientRunner


class ONNXParser:
    def __init__(self, model_name, onnx_path, hailo_output_folder,
                 chosen_hw_arch, width, height):
        self.model_name = model_name
        self.onnx_path = onnx_path
        self.chosen_hw_arch = chosen_hw_arch
        self.width = width
        self.height = height
        self.hailo_output_folder = hailo_output_folder

    def parse(self):
        runner = ClientRunner(hw_arch=self.chosen_hw_arch)
        start_node_names = ["/model.0/conv/Conv"]
        end_node_names = [
            "/model.23/cv2.0/cv2.0.2/Conv",
            "/model.23/cv3.0/cv3.0.2/Conv",
            "/model.23/cv2.1/cv2.1.2/Conv",
            "/model.23/cv3.1/cv3.1.2/Conv",
            "/model.23/cv2.2/cv2.2.2/Conv",
            "/model.23/cv3.2/cv3.2.2/Conv",
        ]

        try:
            runner.translate_onnx_model(
                self.onnx_path,
                self.model_name,
                start_node_names=start_node_names,
                end_node_names=end_node_names,
                net_input_shapes={"/model.0/conv/Conv": [1, 3, self.width, self.height]},
            )
            print("Model translation successful.")
        except Exception as e:
            print(f"Error during model translation: {e}")
            raise

        resulting_hailo_model_har_name = (
            f"{self.model_name}_hailo_model_{self.width}x{self.height}.har"
        )
        resulting_hailo_model_har_name = os.path.join(self.hailo_output_folder, resulting_hailo_model_har_name)
        try:
            runner.save_har(resulting_hailo_model_har_name)
            print(f"HAR file saved as: {resulting_hailo_model_har_name}")
        except Exception as e:
            print(f"Error saving HAR file: {e}")

Modell_Optimizer

import os

from hailo_sdk_client import ClientRunner


class ModelOptimizer:
    def __init__(self, model_name, hailo_output_folder, hailo_model_har_path, calibration_dataset_path,
                 nms_config_path, width, height, compression_level,
                 batch_size_optimization, calibset_size, optimization_level,
                 batch_size_flavor=None,
                 fineTuning_policy="disabled", batch_size_fineTuning=None,
                 epochs_fineTuning=None,
                 adaround_policy="disabled", batch_size_adaround=None):
        self.hailo_output_folder = hailo_output_folder
        self.hailo_model_har_path = hailo_model_har_path
        self.calibration_dataset_path = calibration_dataset_path
        self.nms_config_path = nms_config_path
        self.model_name = model_name
        self.width = width
        self.height = height
        self.calibset_size = calibset_size
        self.batch_size_flavor = batch_size_flavor
        self.batch_size_optimization = batch_size_optimization
        self.batch_size_fineTuning = batch_size_fineTuning
        self.batch_size_adaround = batch_size_adaround
        self.optimization_level = optimization_level
        self.compression_level = compression_level
        self.fineTuning_policy = fineTuning_policy
        self.adaround_policy = adaround_policy
        self.epochs_fineTuning = epochs_fineTuning
        
        
    def optimize(self):
        if not os.path.isfile(self.hailo_model_har_path):
            raise FileNotFoundError(
                f"Hailo model HAR not found: {self.hailo_model_har_path}"
            )
        if not os.path.isfile(self.calibration_dataset_path):
            raise FileNotFoundError(
                f"Calibration dataset not found: {self.calibration_dataset_path}"
            )
        if not os.path.isfile(self.nms_config_path):
            raise FileNotFoundError(f"NMS config not found: {self.nms_config_path}")
        if self.fineTuning_policy == "enabled" and self.batch_size_fineTuning is None:
            raise ValueError(
                "batch_size_fineTuning is required when fineTuning_policy is enabled"
            )
        if self.fineTuning_policy == "enabled" and self.epochs_fineTuning is None:
            raise ValueError(
                "epochs_fineTuning is required when fineTuning_policy is enabled"
            )
        if self.adaround_policy == "enabled" and self.batch_size_adaround is None:
            raise ValueError(
                "batch_size_adaround is required when adaround_policy is enabled"
            )

        runner = ClientRunner(har=self.hailo_model_har_path)
        model_script = (
            "normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])\n"
            "change_output_activation(conv120, sigmoid)\n"
            "change_output_activation(conv143, sigmoid)\n"
            "change_output_activation(conv165, sigmoid)\n"
            f'nms_postprocess("{self.nms_config_path}", meta_arch=yolov8, engine=cpu)\n'
        )

        flavor_batch_size = (
            f", batch_size={self.batch_size_flavor}"
            if self.batch_size_flavor is not None
            else ""
        )
        model_script += (
            f"model_optimization_flavor(optimization_level={self.optimization_level}, "
            f"compression_level={self.compression_level}{flavor_batch_size})\n"
            f"model_optimization_config(calibration, calibset_size={self.calibset_size}, "
            f"batch_size={self.batch_size_optimization})\n"
        )

        if self.fineTuning_policy != "disabled":
            fine_tuning_options = [f"dataset_size={self.calibset_size}"]
            if self.epochs_fineTuning is not None:
                fine_tuning_options.append(f"epochs={self.epochs_fineTuning}")
            if self.batch_size_fineTuning is not None:
                fine_tuning_options.append(f"batch_size={self.batch_size_fineTuning}")
            fine_tuning_options_text = (
                f", {', '.join(fine_tuning_options)}" if fine_tuning_options else ""
            )
            model_script += (
                f"post_quantization_optimization(finetune, policy={self.fineTuning_policy}, "
                "loss_layer_names=[conv113, conv136, conv159, conv117, conv140, conv162, conv120, conv143, conv165], "
                "loss_types=[l2rel, l2rel, l2rel, l2rel, l2rel, l2rel, ce, ce, ce], "
                f"loss_factors=[1, 1, 1, 2, 2, 2, 2, 2, 2]{fine_tuning_options_text})\n"
            )

        if self.adaround_policy != "disabled":
            adaround_batch_size = (
                f", batch_size={self.batch_size_adaround}"
                if self.batch_size_adaround is not None
                else ""
            )
            model_script += (
                f"post_quantization_optimization(adaround, policy={self.adaround_policy}"
                f"{adaround_batch_size})\n"
            )

        runner.load_model_script(model_script)
        runner.optimize(self.calibration_dataset_path)
        quantized_model_output_har_path = os.path.join(
            self.hailo_output_folder,
            f"{self.model_name}_quantized_optimized_model_"
            f"{self.width}x{self.height}_{self.calibset_size}_{self.batch_size_optimization}_"
            f"{self.optimization_level}_{self.compression_level}.har",
        )

        #Output Format: num_calibration_images, batch_size, optimization_level, compression_level
        runner.save_har(quantized_model_output_har_path)
        print(f"Quantized HAR file saved to: {quantized_model_output_har_path}")

Compiling

import os

from hailo_sdk_client import ClientRunner


class ModelCompiler:
    def __init__(self, model_name, quantized_model_har_path, output_dir,
                 width, height, num_calibration_images, batch_size,
                 optimization_level, compression_level, compiler_optimization_level):
        self.model_name = model_name
        self.quantized_model_har_path = quantized_model_har_path
        self.output_dir = output_dir
        self.width = width
        self.height = height
        self.num_calibration_images = num_calibration_images
        self.batch_size = batch_size
        self.optimization_level = optimization_level
        self.compression_level = compression_level
        self.compiler_optimization_level = compiler_optimization_level

    def compile(self):
        if not os.path.isfile(self.quantized_model_har_path):
            raise FileNotFoundError(
                f"Quantized model HAR not found: {self.quantized_model_har_path}"
            )

        runner = ClientRunner(har=self.quantized_model_har_path)
        model_script = (
            f"performance_param(compiler_optimization_level={self.compiler_optimization_level})\n"
        )
        runner.load_model_script(model_script)
        print("[info] ClientRunner initialized successfully.")

        try:
            hef = runner.compile()
            print("[info] Compilation completed successfully.")
        except Exception as e:
            print(f"[error] Failed to compile the model: {e}")
            raise

        os.makedirs(self.output_dir, exist_ok=True)
        hef_path = os.path.join(
            self.output_dir,
            f"{self.model_name}_Finished_{self.width}x{self.height}_"
            f"{self.num_calibration_images}_{self.batch_size}_"
            f"{self.optimization_level}_{self.compression_level}.hef",
        )
        with open(hef_path, "wb") as hef_file:
            hef_file.write(hef)

        print(f"Compiled HEF saved to: {hef_path}")
        return hef_path

NMS_Config

{
    "nms_scores_th": 0.65,
    "nms_iou_th": 0.5,
    "image_dims": [
        640,
        640
    ],
    "max_proposals_per_class": 25,
    "classes": 10,
    "regression_length": 16,
    "background_removal": false,
    "background_removal_index": 0,
    "bbox_decoders": [
        {
            "name": "bbox_decoder117",
            "stride": 8,
            "reg_layer": "conv117",
            "cls_layer": "conv120"
        },
        {
            "name": "bbox_decoder140",
            "stride": 16,
            "reg_layer": "conv140",
            "cls_layer": "conv143"
        },
        {
            "name": "bbox_decoder162",
            "stride": 32,
            "reg_layer": "conv162",
            "cls_layer": "conv165"
        }
   ]
}

The first Python snippets I gathered from doing research and running them one after one. Recently I used the help of AI to get my initial Python Snipets into this Pipeline

Now to answer your questions:

  1. I think that should be these ones
    “/model.23/cv2.0/cv2.0.2/Conv”,
    “/model.23/cv3.0/cv3.0.2/Conv”,
    “/model.23/cv2.1/cv2.1.2/Conv”,
    “/model.23/cv3.1/cv3.1.2/Conv”,
    “/model.23/cv2.2/cv2.2.2/Conv”,
    “/model.23/cv3.2/cv3.2.2/Conv”,
    I think I did the whole matching via the Netron Editor in order to match the correct nodes

  2. Yes I oriented the config along the yolov11l.alls File

  3. Yes these should match. For the NMS config see post before

  4. To be onest I’m not really sure. For yolo I’m executing the following command when running onnx:
    yolo detect predict model=/ultralytics/runs/detect/yolo11l_640_300_Reiher_5weights/best_yolo11l_640_300_Reiher_5.onnx source=[RTSP-Stream]

It says in the Debug Output from yolo:

1/1: [RTSP-Stream]... Success ✅ (inf frames of shape 1280x720 at 20.00 FPS)

0: 640x640 (no detections), 593.1ms
0: 640x640 (no detections), 575.6ms
0: 640x640 (no detections), 503.0ms
0: 640x640 (no detections), 528.3ms
...

so I would say Yes ?

But i also know that frigate isn’t doing detection on the whole image size of the Stream.
It just sends a Region (I think it should also be 640x640) of the image to the detector.
So there could be some differences I’m not fully aware of.
I think that’s the main issue I have. It get’s really complicated cause of all the different places where images are recropped, resized or what not.
And somewhere in that chain something isn’t completely lining up.