diff --git a/README.rst b/README.rst index 348e9d6f..f46d38f6 100644 --- a/README.rst +++ b/README.rst @@ -22,14 +22,14 @@ Hailo Model Zoo :height: 20 -.. |compiler| image:: https://img.shields.io/badge/Hailo%20Dataflow%20Compiler-3.23.0-brightgreen.svg +.. |compiler| image:: https://img.shields.io/badge/Hailo%20Dataflow%20Compiler-3.24.0-brightgreen.svg :target: https://hailo.ai/contact-us/ :alt: Hailo Dataflow Compiler :width: 180 :height: 20 -.. |runtime| image:: https://img.shields.io/badge/HailoRT%20(optional)-4.13.0-brightgreen.svg +.. |runtime| image:: https://img.shields.io/badge/HailoRT%20(optional)-4.14.0-brightgreen.svg :target: https://hailo.ai/contact-us/ :alt: HailoRT :width: 170 diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index dcea620c..33b9531e 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -1,6 +1,41 @@ Changelog ========= +**v2.8** + +* Update to use Dataflow Compiler v3.24.0 (`developer-zone `_) +* Updated to use HailoRT 4.14.0 (`developer-zone `_) +* The Hailo Model Zoo now supports the following vision transformers models: + + * vit_tiny / vit_small / vit_base - encoder based transformer with batchnorm for classification + * detr_resnet_v1_18_bn - encoder/decoder transformer for object detection + * clip_resnet_50 - Contrastive Language-Image Pre-Training for zero-shot classification + * yolov5s_c3tr - object detection model with a MHSA block + +* Using HailoRT-pp for postprocessing of the following variants: + + * yolov5 + * yolox + * ssd + * efficientdet + * yolov7 + +* New Models: + + * repvgg_a1 / repvgg_a2 - classification + * yolov8_seg: yolov8n_seg / yolov8s_seg / yolov8m_seg - instance segmentation + * yolov6n_0.2.1 - object detecion + * zero_dce - low-light enhancement + +* New retraining dockers for: + + * yolov8 + * yolov8_seg + +* Enable compilation for hailo15h device +* Enable evaluation of models with RGBX / NV12 input format +* Bug fixes + **v2.7** * Update to use Dataflow Compiler v3.23.0 (`developer-zone `_) diff --git a/docs/DATA.rst b/docs/DATA.rst index 85aa2afa..b8647705 100644 --- a/docs/DATA.rst +++ b/docs/DATA.rst @@ -34,6 +34,8 @@ We recommend to define the data directory path yourself, by setting the ``HMZ_DA * `CelebA`_ * `LFW`_ * `BSD100`_ + * `CIFAR100`_ + * `LOL`_ .. _ImageNet: @@ -728,3 +730,71 @@ Manual Download (Optional) python hailo_model_zoo/datasets/create_bsd100_tfrecord.py val --lr /path/to/LRbicx4 --hr /path/to/GTmod12 python hailo_model_zoo/datasets/create_bsd100_tfrecord.py calib --lr /path/to/LRbicx4 --hr /path/to/GTmod12 + + +.. _CIFAR100: + +CIFAR100 +------ + +To evaluate/optimize/compile the CLIP models of the +Hailo Model Zoo you should generate the CIFAR100 TFRecord files. + +Run the creation scripts: + +.. code-block:: + + python hailo_model_zoo/datasets/create_cifar100_tfrecord.py val + python hailo_model_zoo/datasets/create_cifar100_tfrecord.py calib + + +.. _LOL: + +LOL +------ + +To evaluate/optimize/compile the low light enhancement models of the +Hailo Model Zoo you should generate the LOL TFRecord files. + +Run the creation scripts: + +.. code-block:: + + python hailo_model_zoo/datasets/create_lol_tfrecord.py val + python hailo_model_zoo/datasets/create_lol_tfrecord.py calib + +Manual Download (Optional) +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. Download the LOL dataset from `here <"https://drive.google.com/uc?export=download&id=157bjO1_cFuSd0HWDUuAmcHRJDVyWpOxB&authuser=0">`_ and extract. + The expected dataset structure: + + .. code-block:: + + lol_dataset + |_ eval15 + |_ high + | |_ 111.png + | |_ 146.png + | |_ ... + |_ low + | |_ 111.png + | |_ 146.png + | |_ ... + |_ our485 + |_ high + | |_ 100.png + | |_ 101.png + | |_ ... + |_ low + | |_ 100.png + | |_ 101.png + | |_ ... + + +#. Run the scripts: + + .. code-block:: + + python hailo_model_zoo/datasets/create_lol_tfrecord.py val --ll /path/to/val/lowlight/images --lle /path/to/val/highlight/images + python hailo_model_zoo/datasets/create_lol_tfrecord.py calib --ll /path/to/train/lowlight/images --lle /path/to/train/highlight/images diff --git a/docs/GETTING_STARTED.rst b/docs/GETTING_STARTED.rst index 5515972c..12ad6f91 100644 --- a/docs/GETTING_STARTED.rst +++ b/docs/GETTING_STARTED.rst @@ -9,8 +9,8 @@ System Requirements * Ubuntu 20.04/22.04, 64 bit (supported also on Windows, under WSL2) * Python 3.8/3.9/3.10, including ``pip`` and ``virtualenv`` -* Hailo Dataflow Compiler v3.23.0 (Obtain from `hailo.ai `_\ ) -* HailoRT 4.13.0 (Obtain from `hailo.ai `_\ ) - required only for inference on Hailo-8. +* Hailo Dataflow Compiler v3.24.0 (Obtain from `hailo.ai `_\ ) +* HailoRT 4.14.0 (Obtain from `hailo.ai `_\ ) - required only for inference on Hailo-8. * The Hailo Model Zoo supports Hailo-8 connected via PCIe only. * Nvidia’s Pascal/Turing/Ampere GPU architecture (such as Titan X Pascal, GTX 1080 Ti, RTX 2080 Ti, or RTX A4000) * GPU driver version 470 @@ -109,6 +109,12 @@ The pre-trained models are stored on AWS S3 and will be downloaded automatically hailomz parse +* The default compilation target is Hailo-8. To compile for different architecture (Hailo-15H for example), use ``--hw_arch hailo15h`` as CLI argument: + +.. code-block:: + + hailomz parse --hw-arch hailo15h + Profiling --------- @@ -167,17 +173,23 @@ To run the Hailo compiler and generate the Hailo Executable Format (HEF) file: hailomz compile +By default the compilation target is Hailo-8. To compile for a different architecture use ``--hw-arch`` command line argument: + +.. code-block:: + + hailomz compile --hw-arch hailo15h + To generate the HEF starting from a previously generated HAR file: .. code-block:: - hailomz compile --har /path/to/model.har + hailomz compile --har /path/to/model.har --hw-arch In order to achieve highest performance, one could use the performance flag: .. code-block:: - hailomz optimize --performance + hailomz optimize --performance --hw-arch The flag will be ignored on models that do not support this feature. The default and performance model scripts are located on `hailo_model_zoo/cfg/alls/` @@ -230,6 +242,8 @@ To explore other options (for example: changing the default batch-size) use: hailomz eval --help +* Currently MZ evaluation can be done only on hailo8 + Visualization ------------- diff --git a/docs/HAILO_MODELS.rst b/docs/HAILO_MODELS.rst index eb51e24b..a777ebc3 100644 --- a/docs/HAILO_MODELS.rst +++ b/docs/HAILO_MODELS.rst @@ -7,7 +7,6 @@ Each model is accompanied with its own README, retraining docker and retraining * FLOPs in the table are counted as MAC operations. -* All models were compiled using Hailo Dataflow Compiler v3.23.0 * Supported tasks: * `Object Detection`_ diff --git a/docs/PUBLIC_MODELS.rst b/docs/PUBLIC_MODELS.rst index 588303f6..88d24b7c 100644 --- a/docs/PUBLIC_MODELS.rst +++ b/docs/PUBLIC_MODELS.rst @@ -13,7 +13,7 @@ Here, we give the full list of publicly pre-trained models supported by the Hail * Network available in `Hailo Benchmark `_ are marked with |rocket| * Networks available in `TAPPAS `_ are marked with |star| * Benchmark, TAPPAS and Recommended networks run in performance mode -* All models were compiled using Hailo Dataflow Compiler v3.23.0 +* All models were compiled using Hailo Dataflow Compiler v3.24.0 * Supported tasks: * `Classification`_ @@ -29,6 +29,9 @@ Here, we give the full list of publicly pre-trained models supported by the Hail * `Super Resolution`_ * `Face Recognition`_ * `Person Attribute`_ + * `Face Attribute`_ + * `Zero-shot Classification`_ + * `Low Light Enhancement`_ * `Hand Landmark detection`_ @@ -49,7 +52,7 @@ ImageNet - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -58,280 +61,307 @@ ImageNet - 79.36 - 300x300x3 - 10.55 - - 9.70 - - `link `_ + - 19.4 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientnet_lite0 - 74.99 - - 73.91 + - 73.81 - 224x224x3 - 4.63 - - 0.39 - - `link `_ + - 0.78 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientnet_lite1 - 76.68 - 76.21 - 240x240x3 - 5.39 - - 0.61 - - `link `_ + - 1.22 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientnet_lite2 - 77.45 - 76.74 - 260x260x3 - 6.06 - - 0.87 - - `link `_ + - 1.74 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientnet_lite3 - 79.29 - 78.33 - 280x280x3 - 8.16 - - 1.40 - - `link `_ + - 2.8 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientnet_lite4 - 80.79 - 80.47 - 300x300x3 - 12.95 - - 2.58 - - `link `_ + - 5.10 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientnet_m |rocket| - 78.91 - 78.63 - 240x240x3 - 6.87 - - 3.68 - - `link `_ + - 7.32 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientnet_s - 77.64 - 77.32 - 224x224x3 - 5.41 - - 2.36 - - `link `_ + - 4.72 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - hardnet39ds - 73.43 - - 72.33 + - 72.92 - 224x224x3 - 3.48 - - 0.43 - - `link `_ + - 0.86 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - hardnet68 - 75.47 - 75.04 - 224x224x3 - 17.56 - - 4.25 - - `link `_ + - 8.5 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - inception_v1 - 69.74 - 69.54 - 224x224x3 - 6.62 - - 1.50 - - `link `_ + - 3 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - mobilenet_v1 - 70.97 - - 70.25 + - 70.15 - 224x224x3 - 4.22 - - 0.57 - - `link `_ + - 1.14 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - mobilenet_v2_1.0 |rocket| - 71.78 - 71.08 - 224x224x3 - 3.49 - - 0.31 - - `link `_ + - 0.62 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - mobilenet_v2_1.4 - 74.18 - 73.07 - 224x224x3 - 6.09 - - 0.59 - - `link `_ + - 1.18 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - mobilenet_v3 - 72.21 - 71.73 - 224x224x3 - 4.07 - - 1.00 - - `link `_ + - 2 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - mobilenet_v3_large_minimalistic - 72.11 - - 71.07 + - 70.92 - 224x224x3 - 3.91 - - 0.21 - - `link `_ + - 0.42 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - regnetx_1.6gf - 77.05 - 76.75 - 224x224x3 - 9.17 - - 1.61 - - `link `_ + - 3.22 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - regnetx_800mf - 75.16 - 74.84 - 224x224x3 - 7.24 - - 0.80 - - `link `_ + - 1.6 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - regnety_200mf - 70.38 - - 69.91 + - 70.02 - 224x224x3 - 3.15 - - 0.20 - - `link `_ + - 0.4 + - `download `_ - `link `_ - - `link `_ + - `download `_ + * - repvgg_a1 + - 74.4 + - 73.61 + - 224x224x3 + - 12.79 + - 4.7 + - `download `_ + - `link `_ + - `download `_ + * - repvgg_a2 + - 76.52 + - 75.08 + - 224x224x3 + - 25.5 + - 10.2 + - `download `_ + - `link `_ + - `download `_ * - resmlp12_relu - 75.26 - - 74.16 + - 74.32 - 224x224x3 - 15.77 - - 3.02 - - `link `_ + - 6.04 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - resnet_v1_18 - 71.26 - 71.06 - 224x224x3 - 11.68 - - 1.82 - - `link `_ + - 3.64 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - resnet_v1_34 - 72.7 - 72.14 - 224x224x3 - 21.79 - - 3.67 - - `link `_ + - 7.34 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - resnet_v1_50 |rocket| |star| - 75.12 - 74.47 - 224x224x3 - 25.53 - - 3.49 - - `link `_ + - 6.98 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - resnet_v2_18 - 69.57 - 69.1 - 224x224x3 - 11.68 - - 1.82 - - `link `_ + - 3.64 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - resnet_v2_34 - 73.07 - 72.72 - 224x224x3 - 21.79 - - 3.67 - - `link `_ + - 7.34 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - resnext26_32x4d - 76.18 - 75.78 - 224x224x3 - 15.37 - - 2.48 - - `link `_ + - 4.96 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - resnext50_32x4d - 79.31 - 78.39 - 224x224x3 - 24.99 - - 4.24 - - `link `_ + - 8.48 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - shufflenet_g8_w1 - 66.3 - 65.5 - 224x224x3 - 2.46 - - 0.18 - - `link `_ + - 0.36 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - squeezenet_v1.1 - 59.85 - 59.4 - 224x224x3 - 1.24 - - 0.39 - - `link `_ + - 0.78 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - vit_base - 79.98 - - 77.25 + - 78.88 - 224x224x3 - 86.5 - - 17.1 - - `link `_ + - 34.2 + - `download `_ - `link `_ - - `link `_ + - `download `_ + * - vit_small + - 78.12 + - 77.02 + - 224x224x3 + - 21.12 + - 8.5 + - `download `_ + - `link `_ + - `download `_ * - vit_tiny - 68.02 - - 65.42 + - 66.08 - 224x224x3 - 5.41 - - 2.36 - - `link `_ + - 4.72 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Object Detection: @@ -350,415 +380,433 @@ COCO - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled * - centernet_resnet_v1_18_postprocess - 26.29 - - 24.16 + - 23.39 - 512x512x3 - 14.22 - - 15.63 - - `link `_ + - 31.26 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - centernet_resnet_v1_50_postprocess - 31.78 - 29.64 - 512x512x3 - 30.07 - - 28.46 - - `link `_ + - 56.92 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - damoyolo_tinynasL20_T - 42.8 - 42.0 - 640x640x3 - 11.35 - - 9.03 - - `link `_ + - 18.06 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - damoyolo_tinynasL25_S - 46.53 - 46.04 - 640x640x3 - 16.25 - - 18.85 - - `link `_ + - 37.7 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - damoyolo_tinynasL35_M - 49.7 - 47.23 - 640x640x3 - 33.98 - - 30.87 - - `link `_ + - 61.74 + - `download `_ - `link `_ - - `link `_ + - `download `_ + * - detr_resnet_v1_18_bn + - 33.9 + - 30.6 + - 800x800x3 + - 32.42 + - 59.16 + - `download `_ + - `link `_ + - `download `_ * - efficientdet_lite0 - - 27.43 - - 26.6 + - 27.32 + - 26.48 - 320x320x3 - 3.56 - - 0.99 - - `link `_ + - 1.98 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientdet_lite1 - - 32.46 - - 31.91 + - 32.27 + - 31.72 - 384x384x3 - 4.73 - - 2 - - `link `_ + - 4 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - efficientdet_lite2 - - 36.16 - - 34.88 + - 35.95 + - 34.67 - 448x448x3 - 5.93 - - 3.42 - - `link `_ + - 6.84 + - `download `_ - `link `_ - - `link `_ - * - nanodet_repvgg + - `download `_ + * - nanodet_repvgg |star| - 29.3 - 28.53 - 416x416x3 - 6.74 - - 5.64 - - `link `_ + - 11.28 + - `download `_ - `link `_ - - `link `_ + - `download `_ + * - nanodet_repvgg_a12 + - 33.7 + - 32.0 + - 640x640x3 + - 5.13 + - 28.23 + - `download `_ + - `link `_ + - `download `_ * - nanodet_repvgg_a1_640 - 33.28 - 32.88 - 640x640x3 - 10.79 - - 21.4 - - `link `_ + - 42.8 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - ssd_mobilenet_v1 |rocket| |star| - 23.17 - - 22.37 + - 22.17 - 300x300x3 - 6.79 - - 1.25 - - `link `_ + - 2.5 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - ssd_mobilenet_v1_hd - 17.66 - - 15.73 + - 15.55 - 720x1280x3 - 6.81 - - 12.26 - - `link `_ + - 24.52 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - ssd_mobilenet_v2 - 24.15 - - 23.07 + - 22.94 - 300x300x3 - 4.46 - - 0.76 - - `link `_ + - 1.52 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - tiny_yolov3 - 14.36 - - 14.16 + - 13.61 - 416x416x3 - 8.85 - - 2.79 - - `link `_ + - 5.58 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - tiny_yolov4 - 19.18 - 17.73 - 416x416x3 - 6.05 - - 3.46 - - `link `_ + - 6.92 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov3 |star| - 38.42 - 37.32 - 608x608x3 - 68.79 - - 79.17 - - `link `_ + - 158.34 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov3_416 - 37.73 - 36.08 - 416x416x3 - 61.92 - - 32.97 - - `link `_ + - 65.94 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov3_gluon |rocket| |star| - 37.28 - 35.64 - 608x608x3 - 68.79 - - 79.17 - - `link `_ + - 140.69 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov3_gluon_416 |star| - 36.27 - 34.92 - 416x416x3 - 61.92 - - 32.97 - - `link `_ + - 65.94 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov4_leaky |star| - 42.37 - - 41.47 + - 41.08 - 512x512x3 - 64.33 - - 45.60 - - `link `_ + - 91.04 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5l - 46.01 - 44.01 - 640x640x3 - 48.54 - - 60.78 - - `link `_ + - 121.56 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5m - 42.59 - 41.19 - 640x640x3 - 21.78 - - 26.14 - - `link `_ + - 52.28 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5m6_6.1 - 50.68 - 48.74 - 1280x1280x3 - 35.70 - - 100.02 - - `link `_ + - 200.04 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5m_6.1 - 44.81 - 43.38 - 640x640x3 - 21.17 - - 24.48 - - `link `_ + - 48.96 + - `download `_ - `link `_ - - `link `_ - * - yolov5m_hpp - - 42.59 - - 41.19 - - 640x640x3 - - 21.78 - - 26.14 - - `link `_ - - `link `_ - - `link `_ + - `download `_ * - yolov5m_wo_spp |rocket| - 42.46 - - 40.43 + - 40.76 - 640x640x3 - 22.67 - - 26.49 - - `link `_ + - 41.67 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5n6_6.1 - 35.63 - 33.68 - 1280x1280x3 - 3.24 - - 9.17 - - `link `_ + - 18.34 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5s |star| - 35.33 - - 34.25 + - 33.98 - 640x640x3 - 7.46 - - 8.72 - - `link `_ + - 17.44 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5s6_6.1 - 44.17 - 41.74 - 1280x1280x3 - 12.61 - - 33.70 - - `link `_ + - 67.4 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5s_c3tr - 37.13 - 35.33 - 640x640x3 - 10.29 - - 8.51 - - `link `_ + - 17.02 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5xs_wo_spp - - 32.78 - - 31.8 + - 33.18 + - 32.2 - 512x512x3 - 7.85 - - 5.68 - - `link `_ + - 11.36 + - `download `_ - `link `_ - - `link `_ - * - yolov5xs_wo_spp_nms + - `download `_ + * - yolov5xs_wo_spp_nms_core - 32.57 - 31.06 - 512x512x3 - 7.85 - - 5.68 - - `link `_ + - 11.36 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov6n - 34.29 - - 32.19 + - 31.99 - 640x640x3 - 4.32 - - 5.57 - - `link `_ + - 4.65 + - `download `_ - `link `_ - - `link `_ + - `download `_ + * - yolov6n_0.2.1 + - 35.2 + - 33.77 + - 640x640x3 + - 4.33 + - 11.06 + - `download `_ + - `link `_ + - `download `_ * - yolov7 - - 49.72 - - 46.92 + - 50.6 + - 47.8 - 640x640x3 - 36.91 - - 52.34 - - `link `_ + - 104.68 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov7_tiny - - 36.49 - - 35.39 + - 37.07 + - 35.97 - 640x640x3 - 6.22 - - 6.87 - - `link `_ + - 13.74 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov7e6 - 55.37 - 53.17 - 1280x1280x3 - 97.20 - - 257.56 - - `link `_ + - 515.12 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov8l - 52.61 - 51.95 - 640x640x3 - 43.7 - - 82.65 - - `link `_ + - 165.3 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov8m - 50.08 - - 49.28 + - 48.73 - 640x640x3 - 25.9 - - 39.5 - - `link `_ + - 78.93 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov8n - 37.23 - 36.23 - 640x640x3 - 3.2 - - 4.4 - - `link `_ + - 8.8 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov8s - 44.75 - 44.15 - 640x640x3 - 11.2 - - 14.3 - - `link `_ + - 28.6 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov8x - 53.61 - 52.21 - 640x640x3 - 68.2 - - 129 - - `link `_ + - 258 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolox_l_leaky |star| - 48.68 - - 47.08 + - 46.77 - 640x640x3 - 54.17 - - 77.74 - - `link `_ + - 155.3 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolox_s_leaky - 38.13 - - 37.51 + - 37.15 - 640x640x3 - 8.96 - - 13.37 - - `link `_ + - 26.74 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolox_s_wide_leaky - 42.4 - - 41.38 + - 40.9 - 640x640x3 - 20.12 - - 29.73 - - `link `_ + - 59.46 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolox_tiny - - 32.64 - - 31.32 + - 32.98 + - 31.26 - 416x416x3 - 5.05 - - 3.22 - - `link `_ + - 6.44 + - `download `_ - `link `_ - - `link `_ + - `download `_ VisDrone ^^^^^^^^ @@ -772,7 +820,7 @@ VisDrone - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -781,10 +829,10 @@ VisDrone - 2.16 - 300x300x3 - 5.64 - - 1.15 - - `link `_ + - 2.3 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Semantic Segmentation: @@ -803,7 +851,7 @@ Cityscapes - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -812,37 +860,37 @@ Cityscapes - 66.39 - 1024x1920x3 - 11.19 - - 71.26 - - `link `_ + - 142.52 + - `download `_ - `link `_ - - `link `_ - * - fcn8_resnet_v1_18 + - `download `_ + * - fcn8_resnet_v1_18 |star| - 68.75 - - 67.97 + - 67.85 - 1024x1920x3 - 11.20 - - 71.51 - - `link `_ + - 143.02 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - fcn8_resnet_v1_22 - 67.55 - 67.39 - - 1024x1920x3 + - 1920x1024x3 - 15.12 - - 150.04 - - `link `_ + - 300.08 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - stdc1 |rocket| - 74.57 - - 73.47 + - 73.57 - 1024x1920x3 - 8.27 - - 63.34 - - `link `_ + - 126.47 + - `download `_ - `link `_ - - `link `_ + - `download `_ Oxford-IIIT Pet ^^^^^^^^^^^^^^^ @@ -856,7 +904,7 @@ Oxford-IIIT Pet - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -865,10 +913,10 @@ Oxford-IIIT Pet - 77.02 - 256x256x3 - 10.08 - - 14.44 - - `link `_ + - 28.88 + - `download `_ - `link `_ - - `link `_ + - `download `_ Pascal VOC ^^^^^^^^^^ @@ -882,7 +930,7 @@ Pascal VOC - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -891,19 +939,19 @@ Pascal VOC - 74.8 - 513x513x3 - 2.10 - - 8.91 - - `link `_ + - 17.82 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - deeplab_v3_mobilenet_v2_wo_dilation - 71.46 - 71.08 - 513x513x3 - 2.10 - - 1.64 - - `link `_ + - 3.28 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Pose Estimation: @@ -922,37 +970,37 @@ COCO - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled * - centerpose_regnetx_1.6gf_fpn |star| - 53.54 - - 47.65 + - 48.29 - 640x640x3 - 14.28 - - 32.38 - - `link `_ + - 64.76 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - centerpose_regnetx_800mf - 44.07 - - 41.9 + - 42.02 - 512x512x3 - 12.31 - - 43.06 - - `link `_ + - 86.12 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - centerpose_repvgg_a0 |star| - 39.17 - - 37.09 + - 37.37 - 416x416x3 - 11.71 - - 14.15 - - `link `_ + - 24.76 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Single Person Pose Estimation: @@ -971,19 +1019,19 @@ COCO - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled - * - mspn_regnetx_800mf + * - mspn_regnetx_800mf |star| - 70.8 - 70.3 - 256x192x3 - 7.17 - - 1.47 - - `link `_ + - 2.94 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Face Detection: @@ -1002,55 +1050,55 @@ WiderFace - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled * - lightface_slim |star| - 39.7 - - 39.41 + - 39.22 - 240x320x3 - 0.26 - 0.08 - - `link `_ + - `download `_ - `link `_ - - `link `_ + - `download `_ * - retinaface_mobilenet_v1 |star| - 81.27 - 81.17 - 736x1280x3 - 3.49 - - 12.57 - - `link `_ + - 25.14 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - scrfd_10g - 82.13 - 82.03 - 640x640x3 - 4.23 - - 13.37 - - `link `_ + - 26.74 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - scrfd_2.5g - 76.59 - 76.32 - 640x640x3 - 0.82 - - 3.44 - - `link `_ + - 6.88 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - scrfd_500m - 68.98 - 68.88 - 640x640x3 - 0.63 - - 0.75 - - `link `_ + - 1.5 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Instance Segmentation: @@ -1065,11 +1113,11 @@ COCO :header-rows: 1 * - Network Name - - mAP-segmentation + - mAP - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -1078,73 +1126,100 @@ COCO - 14.86 - 512x512x3 - 19.11 - - 51.92 - - `link `_ + - 103.84 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolact_regnetx_1.6gf - 27.57 - 27.27 - 512x512x3 - 30.09 - - 62.67 - - `link `_ + - 125.34 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolact_regnetx_800mf - 25.61 - 25.5 - 512x512x3 - 28.3 - - 58.375 - - `link `_ + - 116.75 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolact_regnetx_800mf_20classes |star| - 20.23 - 20.22 - 512x512x3 - 21.97 - - 51.47 - - `link `_ + - 102.94 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5l_seg - 39.78 - 39.09 - 640x640x3 - 47.89 - - 73.94 - - `link `_ + - 147.88 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5m_seg - 37.05 - 36.32 - 640x640x3 - 32.60 - - 35.47 - - `link `_ + - 70.94 + - `download `_ - `link `_ - - `link `_ - * - yolov5n_seg + - `download `_ + * - yolov5n_seg |star| - 23.35 - 22.24 - 640x640x3 - 1.99 - - 3.55 - - `link `_ + - 7.1 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - yolov5s_seg - 31.57 - 30.49 - 640x640x3 - 7.61 - - 13.21 - - `link `_ + - 26.42 + - `download `_ - `link `_ - - `link `_ + - `download `_ + * - yolov8m_seg + - 40.6 + - 39.88 + - 640x640x3 + - 27.3 + - 104.6 + - `download `_ + - `link `_ + - `download `_ + * - yolov8n_seg + - 30.32 + - 29.68 + - 640x640x3 + - 3.4 + - 12.04 + - `download `_ + - `link `_ + - `download `_ + * - yolov8s_seg + - 36.63 + - 35.8 + - 640x640x3 + - 11.8 + - 40.2 + - `download `_ + - `link `_ + - `download `_ D2S ^^^ @@ -1158,7 +1233,7 @@ D2S - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -1167,10 +1242,10 @@ D2S - 63.36 - 512x512x3 - 22.14 - - 51.62 - - `link `_ + - 103.24 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Depth Estimation: @@ -1189,7 +1264,7 @@ NYU - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -1198,10 +1273,10 @@ NYU - 0.61 - 224x224x3 - 1.35 - - 0.37 - - `link `_ + - 0.74 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Facial Landmark Detection: @@ -1220,19 +1295,19 @@ AFLW2k3d - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled * - tddfa_mobilenet_v1 |star| - 3.68 - - 3.78 + - 4.05 - 120x120x3 - 3.26 - - 0.18 - - `link `_ + - 0.36 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Person Re-ID: @@ -1251,37 +1326,37 @@ Market1501 - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled * - osnet_x1_0 - 94.43 - - 93.34 + - 93.7 - 256x128x3 - 2.19 - - 0.99 - - `link `_ + - 1.98 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - repvgg_a0_person_reid_2048 - 90.02 - 89.12 - 256x128x3 - 9.65 - - 0.89 - - `link `_ + - 1.78 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - repvgg_a0_person_reid_512 |star| - 89.9 - 89.4 - 256x128x3 - 7.68 - - 0.89 - - `link `_ + - 1.78 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Super Resolution: @@ -1300,7 +1375,7 @@ BSD100 - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -1309,28 +1384,28 @@ BSD100 - 30.3 - 156x240x1 - 0.02 - - 0.8 - - `link `_ + - 1.6 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - espcn_x3 - 28.41 - 28.06 - 104x160x1 - 0.02 - - 0.38 - - `link `_ + - 0.76 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - espcn_x4 - 26.83 - 26.58 - 78x120x1 - 0.02 - - 0.23 - - `link `_ + - 0.46 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Face Recognition: @@ -1349,7 +1424,7 @@ LFW - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -1358,19 +1433,19 @@ LFW - 99.41 - 112x112x3 - 2.04 - - 0.44 - - `link `_ + - 0.88 + - `download `_ - `link `_ - - `link `_ + - `download `_ * - arcface_r50 - 99.72 - 99.71 - 112x112x3 - 31.0 - - 6.30 - - `link `_ + - 12.6 + - `download `_ - `link `_ - - `link `_ + - `download `_ .. _Person Attribute: @@ -1389,7 +1464,7 @@ PETA - Quantized - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled @@ -1398,10 +1473,98 @@ PETA - 82.61 - 224x224x3 - 11.19 - - 1.82 - - `link `_ + - 3.64 + - `download `_ - `link `_ - - `link `_ + - `download `_ + +.. _Face Attribute: + +Face Attribute +-------------- + +CELEBA +^^^^^^ + +.. list-table:: + :widths: 30 7 11 14 9 8 12 8 7 + :header-rows: 1 + + * - Network Name + - Mean Accuracy + - Quantized + - Input Resolution (HxWxC) + - Params (M) + - OPS (G) + - Pretrained + - Source + - Compiled + * - face_attr_resnet_v1_18 + - 81.19 + - 81.09 + - 218x178x3 + - 11.74 + - 3 + - `download `_ + - `link `_ + - `download `_ + +.. _Zero-shot Classification: + +Zero-shot Classification +------------------------ + +CIFAR100 +^^^^^^^^ + +.. list-table:: + :widths: 30 7 11 14 9 8 12 8 7 + :header-rows: 1 + + * - Network Name + - Accuracy (top1) + - Quantized + - Input Resolution (HxWxC) + - Params (M) + - OPS (G) + - Pretrained + - Source + - Compiled + * - clip_resnet_50 + - 42.07 + - 39.57 + - 224x224x3 + - 38.72 + - 11.62 + - `download `_ + - `link `_ + - `download `_ + +.. _Low Light Enhancement: + +Low Light Enhancement +--------------------- + +LOL +^^^ + +.. list-table:: + :header-rows: 1 + + * - Network Name + - Input Resolution (HxWxC) + - Params (M) + - OPS (G) + - Pretrained + - Source + - Compiled + * - zero_dce + - 600x400x3 + - 0.21 + - 38.2 + - `download `_ + - `link `_ + - `download `_ .. _Hand Landmark detection: @@ -1417,14 +1580,14 @@ Hand Landmark * - Network Name - Input Resolution (HxWxC) - Params (M) - - MAC (G) + - OPS (G) - Pretrained - Source - Compiled * - hand_landmark_lite - 224x224x3 - 1.01 - - 0.15 - - `link `_ + - 0.3 + - `download `_ - `link `_ - - `link `_ + - `download `_ diff --git a/docs/RETRAIN_ON_CUSTOM_DATASET.rst b/docs/RETRAIN_ON_CUSTOM_DATASET.rst index 2273fb1d..4665d0f1 100644 --- a/docs/RETRAIN_ON_CUSTOM_DATASET.rst +++ b/docs/RETRAIN_ON_CUSTOM_DATASET.rst @@ -22,6 +22,7 @@ Retraining is not available inside the docker version of Hailo Software Suite. I * `YOLOv4 <../training/yolov4/README.rst>`_ * `YOLOv5 <../training/yolov5/README.rst>`_ * `YOLOX <../training/yolox/README.rst>`_ +* `DAMO-YOLO <../training/damoyolo/README.rst>`_ * `NanoDet <../training/nanodet/README.rst>`_ * `SSD <../training/ssd/README.rst>`_ diff --git a/docs/YAML.rst b/docs/YAML.rst index da30ee14..9b24509b 100644 --- a/docs/YAML.rst +++ b/docs/YAML.rst @@ -52,7 +52,7 @@ Properties * | **meta_arch** *(['string', 'null'])*\ : Postprocessing meta architecture name. | For example: yolo_v3, yolo_v4, etc. Default: ``None``. - * | **postprocess_config_json** *(['string', 'null'])*\ : Path to JSON file with the postprocessing configuration (for offloading NMS to the Hailo-8). Default: ``None``. + * | **postprocess_config_file** *(['string', 'null'])*\ : Path to a file with the postprocessing configuration (for example, for offloading NMS to the Hailo-8). Default: ``None``. * | **device_pre_post_layers**\ : Whether to use postprocessing on chip or do it on the host. * | **bilinear** *(boolean)*\ : Activate the bilinear PPU layer. Default: ``False``. diff --git a/docs/images/logo.png b/docs/images/logo.png index ccc0656f..85a20fa0 100644 Binary files a/docs/images/logo.png and b/docs/images/logo.png differ diff --git a/hailo_model_zoo/cfg/alls/base/efficientdet_lite0.alls b/hailo_model_zoo/cfg/alls/base/efficientdet_lite0.alls deleted file mode 100644 index be689de2..00000000 --- a/hailo_model_zoo/cfg/alls/base/efficientdet_lite0.alls +++ /dev/null @@ -1,3 +0,0 @@ -normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) -post_quantization_optimization(bias_correction, policy=enabled) -post_quantization_optimization(finetune, policy=disabled) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/efficientdet_lite1.alls b/hailo_model_zoo/cfg/alls/base/efficientdet_lite1.alls deleted file mode 100644 index 3b70552f..00000000 --- a/hailo_model_zoo/cfg/alls/base/efficientdet_lite1.alls +++ /dev/null @@ -1,3 +0,0 @@ -normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) -post_quantization_optimization(bias_correction, policy=enabled) -post_quantization_optimization(finetune, policy=disabled) diff --git a/hailo_model_zoo/cfg/alls/base/efficientdet_lite2.alls b/hailo_model_zoo/cfg/alls/base/efficientdet_lite2.alls deleted file mode 100644 index 9715db32..00000000 --- a/hailo_model_zoo/cfg/alls/base/efficientdet_lite2.alls +++ /dev/null @@ -1,4 +0,0 @@ -normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) -post_quantization_optimization(bias_correction, policy=enabled) -model_optimization_config(calibration, batch_size=4) -post_quantization_optimization(finetune, policy=disabled) diff --git a/hailo_model_zoo/cfg/alls/base/hardnet39ds.alls b/hailo_model_zoo/cfg/alls/base/hardnet39ds.alls deleted file mode 100644 index 4d456394..00000000 --- a/hailo_model_zoo/cfg/alls/base/hardnet39ds.alls +++ /dev/null @@ -1,4 +0,0 @@ -normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) -pre_quantization_optimization(equalization, policy=disabled) -post_quantization_optimization(finetune, policy=disabled) -post_quantization_optimization(bias_correction, policy=enabled) diff --git a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_hd.alls b/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_hd.alls deleted file mode 100644 index dc4a09a9..00000000 --- a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_hd.alls +++ /dev/null @@ -1,4 +0,0 @@ -normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) -model_optimization_config(calibration, batch_size=1, calibset_size=32) -post_quantization_optimization(finetune, policy=disabled) -post_quantization_optimization(bias_correction, policy=enabled) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m_vehicles.alls b/hailo_model_zoo/cfg/alls/base/yolov5m_vehicles.alls deleted file mode 100644 index 9f24ae5b..00000000 --- a/hailo_model_zoo/cfg/alls/base/yolov5m_vehicles.alls +++ /dev/null @@ -1,13 +0,0 @@ -normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) -resize_input1 = resize_input([1080, 1920], input_layer1) -change_output_activation(sigmoid) -model_optimization_config(calibration, batch_size=4, calibset_size=64) -quantization_param(conv45, precision_mode=a8_w4) -quantization_param(conv46, precision_mode=a8_w4) -quantization_param(conv51, precision_mode=a8_w4) -quantization_param(conv53, precision_mode=a8_w4) -quantization_param(conv84, precision_mode=a8_w4) -quantization_param(conv89, precision_mode=a8_w4) -quantization_param(conv91, precision_mode=a8_w4) -quantization_param({output_layer*}, precision_mode=a8_w8) -post_quantization_optimization(finetune, policy=enabled, use_acceleras=disabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5s.alls b/hailo_model_zoo/cfg/alls/base/yolov5s.alls deleted file mode 100644 index c2473039..00000000 --- a/hailo_model_zoo/cfg/alls/base/yolov5s.alls +++ /dev/null @@ -1,5 +0,0 @@ -normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) -change_output_activation(sigmoid) -model_optimization_config(calibration, batch_size=4, calibset_size=64) -pre_quantization_optimization(equalization, policy=disabled) -quantization_param({output_layer*}, precision_mode=a8_w8) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov7_tiny.alls b/hailo_model_zoo/cfg/alls/base/yolov7_tiny.alls deleted file mode 100644 index c0b893e1..00000000 --- a/hailo_model_zoo/cfg/alls/base/yolov7_tiny.alls +++ /dev/null @@ -1,2 +0,0 @@ -normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) -change_output_activation(sigmoid) diff --git a/hailo_model_zoo/cfg/alls/base/yolox_l_leaky.alls b/hailo_model_zoo/cfg/alls/base/yolox_l_leaky.alls deleted file mode 100644 index 6e95f666..00000000 --- a/hailo_model_zoo/cfg/alls/base/yolox_l_leaky.alls +++ /dev/null @@ -1,12 +0,0 @@ -model_optimization_config(calibration, use_acceleras=disabled, batch_size=2, calibset_size=64) - -input_conversion = input_conversion(bgr_to_rgb) - -pre_quantization_optimization(activation_clipping, layers=[conv93], mode=percentile_force, clipping_values=[0.0001,99.6]) -pre_quantization_optimization(activation_clipping, layers=[conv95], mode=percentile_force, clipping_values=[0.15,99.4]) -pre_quantization_optimization(activation_clipping, layers=[conv111], mode=percentile_force, clipping_values=[0.0001,99.5]) -pre_quantization_optimization(activation_clipping, layers=[conv113], mode=percentile_force, clipping_values=[0.15,99.4]) -pre_quantization_optimization(activation_clipping, layers=[conv128], mode=percentile_force, clipping_values=[0.0001,99.5]) -pre_quantization_optimization(activation_clipping, layers=[conv130], mode=percentile_force, clipping_values=[0.15,99.4]) -post_quantization_optimization(finetune, policy=enabled, use_acceleras=disabled, loss_factors=[0.125, 2, 0.25, 0.125, 2, 0.25, 0.125, 2, 0.25], dataset_size=4000, epochs=8, learning_rate=1e-05, loss_layer_names=[conv94, conv95, conv96, conv112, conv113, conv114, conv129, conv130, conv131], loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2]) -quantization_param({output_layer*}, precision_mode=a8_w8) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolox_s_leaky.alls b/hailo_model_zoo/cfg/alls/base/yolox_s_leaky.alls deleted file mode 100644 index 9b659f37..00000000 --- a/hailo_model_zoo/cfg/alls/base/yolox_s_leaky.alls +++ /dev/null @@ -1,2 +0,0 @@ -input_conversion = input_conversion(bgr_to_rgb) -post_quantization_optimization(finetune, policy=disabled) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolox_s_wide_leaky.alls b/hailo_model_zoo/cfg/alls/base/yolox_s_wide_leaky.alls deleted file mode 100644 index 43ca766d..00000000 --- a/hailo_model_zoo/cfg/alls/base/yolox_s_wide_leaky.alls +++ /dev/null @@ -1,2 +0,0 @@ -# post_quantization_optimization commands -post_quantization_optimization(finetune, policy=disabled) diff --git a/hailo_model_zoo/cfg/alls/base/arcface_mobilefacenet.alls b/hailo_model_zoo/cfg/alls/generic/arcface_mobilefacenet.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/arcface_mobilefacenet.alls rename to hailo_model_zoo/cfg/alls/generic/arcface_mobilefacenet.alls diff --git a/hailo_model_zoo/cfg/alls/generic/arcface_mobilefacenet_nv12.alls b/hailo_model_zoo/cfg/alls/generic/arcface_mobilefacenet_nv12.alls new file mode 100644 index 00000000..9ef7c560 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/arcface_mobilefacenet_nv12.alls @@ -0,0 +1,4 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) +yuv_to_rgb1 = input_conversion(yuv_to_rgb) +reshape, resize, concat = input_conversion(arcface_mobilefacenet_nv12/input_layer1, nv12_to_hailo_yuv, emulator_support=True) +quantization_param(output_layer1, precision_mode=a8_w8) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/arcface_mobilefacenet_rgbx.alls b/hailo_model_zoo/cfg/alls/generic/arcface_mobilefacenet_rgbx.alls new file mode 100644 index 00000000..877ef3fa --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/arcface_mobilefacenet_rgbx.alls @@ -0,0 +1,2 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) +reshape_rgb = input_conversion(input_layer1, tf_rgbx_to_hailo_rgb, emulator_support=True) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/arcface_r50.alls b/hailo_model_zoo/cfg/alls/generic/arcface_r50.alls new file mode 100644 index 00000000..8d67e186 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/arcface_r50.alls @@ -0,0 +1 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) diff --git a/hailo_model_zoo/cfg/alls/base/centernet_resnet_v1_18_postprocess.alls b/hailo_model_zoo/cfg/alls/generic/centernet_resnet_v1_18_postprocess.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/centernet_resnet_v1_18_postprocess.alls rename to hailo_model_zoo/cfg/alls/generic/centernet_resnet_v1_18_postprocess.alls diff --git a/hailo_model_zoo/cfg/alls/base/centernet_resnet_v1_50_postprocess.alls b/hailo_model_zoo/cfg/alls/generic/centernet_resnet_v1_50_postprocess.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/centernet_resnet_v1_50_postprocess.alls rename to hailo_model_zoo/cfg/alls/generic/centernet_resnet_v1_50_postprocess.alls diff --git a/hailo_model_zoo/cfg/alls/base/centerpose_regnetx_1.6gf_fpn.alls b/hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_1.6gf_fpn.alls similarity index 88% rename from hailo_model_zoo/cfg/alls/base/centerpose_regnetx_1.6gf_fpn.alls rename to hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_1.6gf_fpn.alls index 92af88ab..6b336ca3 100644 --- a/hailo_model_zoo/cfg/alls/base/centerpose_regnetx_1.6gf_fpn.alls +++ b/hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_1.6gf_fpn.alls @@ -3,4 +3,3 @@ model_optimization_config(calibration, batch_size=4, calibset_size=32) pre_quantization_optimization(equalization, policy=disabled) change_output_activation(centerpose_regnetx_1_6gf_fpn/conv79, sigmoid) change_output_activation(centerpose_regnetx_1_6gf_fpn/conv75, sigmoid) -quantization_param({*output_layer*}, precision_mode=a8_w8) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/centerpose_regnetx_1.6gf_fpn_center_nms.alls b/hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_1.6gf_fpn_center_nms.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/centerpose_regnetx_1.6gf_fpn_center_nms.alls rename to hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_1.6gf_fpn_center_nms.alls diff --git a/hailo_model_zoo/cfg/alls/base/centerpose_regnetx_1.6gf_fpn_joint_nms.alls b/hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_1.6gf_fpn_joint_nms.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/centerpose_regnetx_1.6gf_fpn_joint_nms.alls rename to hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_1.6gf_fpn_joint_nms.alls diff --git a/hailo_model_zoo/cfg/alls/base/centerpose_regnetx_800mf.alls b/hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_800mf.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/centerpose_regnetx_800mf.alls rename to hailo_model_zoo/cfg/alls/generic/centerpose_regnetx_800mf.alls diff --git a/hailo_model_zoo/cfg/alls/base/centerpose_repvgg_a0.alls b/hailo_model_zoo/cfg/alls/generic/centerpose_repvgg_a0.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/centerpose_repvgg_a0.alls rename to hailo_model_zoo/cfg/alls/generic/centerpose_repvgg_a0.alls diff --git a/hailo_model_zoo/cfg/alls/base/centerpose_repvgg_a0_common.alls b/hailo_model_zoo/cfg/alls/generic/centerpose_repvgg_a0_common.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/centerpose_repvgg_a0_common.alls rename to hailo_model_zoo/cfg/alls/generic/centerpose_repvgg_a0_common.alls diff --git a/hailo_model_zoo/cfg/alls/generic/clip_resnet_50.alls b/hailo_model_zoo/cfg/alls/generic/clip_resnet_50.alls new file mode 100644 index 00000000..4227ea17 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/clip_resnet_50.alls @@ -0,0 +1,2 @@ +normalization1 = normalization([122.7709383, 116.7460125, 104.09373615000001], [68.5005327, 66.6321579, 70.32316304999999]) +model_optimization_flavor(optimization_level=4, compression_level=0) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/damoyolo_tinynasL20_T.alls b/hailo_model_zoo/cfg/alls/generic/damoyolo_tinynasL20_T.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/damoyolo_tinynasL20_T.alls rename to hailo_model_zoo/cfg/alls/generic/damoyolo_tinynasL20_T.alls diff --git a/hailo_model_zoo/cfg/alls/base/damoyolo_tinynasL25_S.alls b/hailo_model_zoo/cfg/alls/generic/damoyolo_tinynasL25_S.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/damoyolo_tinynasL25_S.alls rename to hailo_model_zoo/cfg/alls/generic/damoyolo_tinynasL25_S.alls diff --git a/hailo_model_zoo/cfg/alls/base/damoyolo_tinynasL35_M.alls b/hailo_model_zoo/cfg/alls/generic/damoyolo_tinynasL35_M.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/damoyolo_tinynasL35_M.alls rename to hailo_model_zoo/cfg/alls/generic/damoyolo_tinynasL35_M.alls diff --git a/hailo_model_zoo/cfg/alls/base/deeplab_v3_mobilenet_v2.alls b/hailo_model_zoo/cfg/alls/generic/deeplab_v3_mobilenet_v2.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/deeplab_v3_mobilenet_v2.alls rename to hailo_model_zoo/cfg/alls/generic/deeplab_v3_mobilenet_v2.alls diff --git a/hailo_model_zoo/cfg/alls/base/deeplab_v3_mobilenet_v2_wo_dilation.alls b/hailo_model_zoo/cfg/alls/generic/deeplab_v3_mobilenet_v2_wo_dilation.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/deeplab_v3_mobilenet_v2_wo_dilation.alls rename to hailo_model_zoo/cfg/alls/generic/deeplab_v3_mobilenet_v2_wo_dilation.alls diff --git a/hailo_model_zoo/cfg/alls/generic/detr_resnet_v1_18_bn.alls b/hailo_model_zoo/cfg/alls/generic/detr_resnet_v1_18_bn.alls new file mode 100644 index 00000000..fdc7189f --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/detr_resnet_v1_18_bn.alls @@ -0,0 +1,58 @@ +norm_layer = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +post_quantization_optimization(bias_correction, policy=disabled) +pre_quantization_optimization(equalization, policy=enabled) +model_optimization_flavor(optimization_level=0, compression_level=0) + +# model_optimization_config commands +model_optimization_config(calibration,batch_size=8, calibset_size=32) +model_optimization_config(checker_cfg, policy=enabled, batch_size=1) +quantization_param([detr_resnet_v1_18_bn/conv116, detr_resnet_v1_18_bn/conv115], precision_mode=a16_w16) +quantization_param([detr_resnet_v1_18_bn/conv116, detr_resnet_v1_18_bn/conv115], bias_mode=single_scale_decomposition) + +quantization_param({ew_sub*}, activation_fit=disabled) + +quantization_param({output_layer*}, precision_mode=a16_w16) +change_output_activation(detr_resnet_v1_18_bn/conv116, linear) + + +resources_param(strategy=greedy, max_control_utilization=0.75, max_compute_utilization=0.75, max_memory_utilization=0.75) + +context_switch_param(mode=enabled) +context_0 = context([input_layer1]) +context_1 = context([conv18, const_input1]) +context_2 = context([matmul1, matmul2, conv25, const_input12, const_input18, const_input19]) +context_3 = context([matmul7, matmul8, conv43, const_input20, const_input21, const_input22, const_input23, const_input24, const_input2, const_input3, const_input4]) +context_4 = context([matmul13, matmul14, const_input6, matmul17, matmul18, matmul21, matmul22, const_input5, const_input6, const_input7, const_input8, const_input9, const_input13, const_input14, const_input15]) +context_5 = context([matmul25, matmul26, conv94, matmul29, matmul30, matmul33, matmul34, const_input10, const_input16, const_input11, const_input17]) + + +reshape1 = format_conversion(format_conversion1, reshape_1xw0_to_hxw) +const_input_reshape1 = format_conversion(const_input1, reshape_1xw0_to_hxw) +const_input_reshape2 = format_conversion(const_input2, reshape_1xw0_to_hxw) +const_input_reshape3 = format_conversion(const_input3, reshape_1xw0_to_hxw) +const_input_reshape4 = format_conversion(const_input4, reshape_1xw0_to_hxw) +const_input_reshape5 = format_conversion(const_input5, reshape_1xw0_to_hxw) +const_input_reshape6 = format_conversion(const_input6, reshape_1xw0_to_hxw) +const_input_reshape7 = format_conversion(const_input7, reshape_1xw0_to_hxw) +const_input_reshape8 = format_conversion(const_input8, reshape_1xw0_to_hxw) +const_input_reshape9 = format_conversion(const_input9, reshape_1xw0_to_hxw) +const_input_reshape10 = format_conversion(const_input10, reshape_1xw0_to_hxw) +const_input_reshape11 = format_conversion(const_input11, reshape_1xw0_to_hxw) +const_input_reshape12 = format_conversion(const_input12, reshape_1xw0_to_hxw) +const_input_reshape13 = format_conversion(const_input13, reshape_1xw0_to_hxw) +const_input_reshape14 = format_conversion(const_input14, reshape_1xw0_to_hxw) +const_input_reshape15 = format_conversion(const_input15, reshape_1xw0_to_hxw) +const_input_reshape16 = format_conversion(const_input16, reshape_1xw0_to_hxw) +const_input_reshape17 = format_conversion(const_input17, reshape_1xw0_to_hxw) +const_input_reshape18 = format_conversion(const_input18, reshape_1xw0_to_hxw) +const_input_reshape19 = format_conversion(const_input19, reshape_1xw0_to_hxw) +const_input_reshape20 = format_conversion(const_input20, reshape_1xw0_to_hxw) +const_input_reshape21 = format_conversion(const_input21, reshape_1xw0_to_hxw) +const_input_reshape22 = format_conversion(const_input22, reshape_1xw0_to_hxw) +const_input_reshape23 = format_conversion(const_input23, reshape_1xw0_to_hxw) +const_input_reshape24 = format_conversion(const_input24, reshape_1xw0_to_hxw) + +reshape2 = format_conversion(conv113, spatial_flatten, 1, 100) +reshape3 = format_conversion(conv116, spatial_flatten, 1, 100) + + diff --git a/hailo_model_zoo/cfg/alls/generic/efficientdet_lite0.alls b/hailo_model_zoo/cfg/alls/generic/efficientdet_lite0.alls new file mode 100644 index 00000000..03bc5d53 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/efficientdet_lite0.alls @@ -0,0 +1,9 @@ +normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite0/pretrained/2023-04-25/efficientdet_lite0_nms_config.json", ssd, engine=cpu) +change_output_activation(efficientdet_lite0/conv66, sigmoid) +change_output_activation(efficientdet_lite0/conv75, sigmoid) +change_output_activation(efficientdet_lite0/conv84, sigmoid) +change_output_activation(efficientdet_lite0/conv93, sigmoid) +change_output_activation(efficientdet_lite0/conv102, sigmoid) +post_quantization_optimization(bias_correction, policy=enabled) +post_quantization_optimization(finetune, policy=disabled) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/efficientdet_lite1.alls b/hailo_model_zoo/cfg/alls/generic/efficientdet_lite1.alls new file mode 100644 index 00000000..38c054cb --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/efficientdet_lite1.alls @@ -0,0 +1,9 @@ +normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite1/pretrained/2023-04-25/efficientdet_lite1_nms_config.json", ssd, engine=cpu) +change_output_activation(efficientdet_lite1/conv84, sigmoid) +change_output_activation(efficientdet_lite1/conv93, sigmoid) +change_output_activation(efficientdet_lite1/conv102, sigmoid) +change_output_activation(efficientdet_lite1/conv111, sigmoid) +change_output_activation(efficientdet_lite1/conv120, sigmoid) +post_quantization_optimization(bias_correction, policy=enabled) +post_quantization_optimization(finetune, policy=disabled) diff --git a/hailo_model_zoo/cfg/alls/generic/efficientdet_lite2.alls b/hailo_model_zoo/cfg/alls/generic/efficientdet_lite2.alls new file mode 100644 index 00000000..a40940a2 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/efficientdet_lite2.alls @@ -0,0 +1,10 @@ +normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite2/pretrained/2023-04-25/efficientdet_lite2_nms_config.json", ssd, engine=cpu) +change_output_activation(efficientdet_lite2/conv92, sigmoid) +change_output_activation(efficientdet_lite2/conv101, sigmoid) +change_output_activation(efficientdet_lite2/conv110, sigmoid) +change_output_activation(efficientdet_lite2/conv119, sigmoid) +change_output_activation(efficientdet_lite2/conv128, sigmoid) +post_quantization_optimization(bias_correction, policy=enabled) +model_optimization_config(calibration, batch_size=4) +post_quantization_optimization(finetune, policy=disabled) diff --git a/hailo_model_zoo/cfg/alls/base/efficientnet_l.alls b/hailo_model_zoo/cfg/alls/generic/efficientnet_l.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/efficientnet_l.alls rename to hailo_model_zoo/cfg/alls/generic/efficientnet_l.alls diff --git a/hailo_model_zoo/cfg/alls/base/efficientnet_lite0.alls b/hailo_model_zoo/cfg/alls/generic/efficientnet_lite0.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/efficientnet_lite0.alls rename to hailo_model_zoo/cfg/alls/generic/efficientnet_lite0.alls diff --git a/hailo_model_zoo/cfg/alls/base/efficientnet_lite1.alls b/hailo_model_zoo/cfg/alls/generic/efficientnet_lite1.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/efficientnet_lite1.alls rename to hailo_model_zoo/cfg/alls/generic/efficientnet_lite1.alls diff --git a/hailo_model_zoo/cfg/alls/base/efficientnet_lite2.alls b/hailo_model_zoo/cfg/alls/generic/efficientnet_lite2.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/efficientnet_lite2.alls rename to hailo_model_zoo/cfg/alls/generic/efficientnet_lite2.alls diff --git a/hailo_model_zoo/cfg/alls/base/efficientnet_lite3.alls b/hailo_model_zoo/cfg/alls/generic/efficientnet_lite3.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/efficientnet_lite3.alls rename to hailo_model_zoo/cfg/alls/generic/efficientnet_lite3.alls diff --git a/hailo_model_zoo/cfg/alls/base/efficientnet_lite4.alls b/hailo_model_zoo/cfg/alls/generic/efficientnet_lite4.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/efficientnet_lite4.alls rename to hailo_model_zoo/cfg/alls/generic/efficientnet_lite4.alls diff --git a/hailo_model_zoo/cfg/alls/base/efficientnet_m.alls b/hailo_model_zoo/cfg/alls/generic/efficientnet_m.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/efficientnet_m.alls rename to hailo_model_zoo/cfg/alls/generic/efficientnet_m.alls diff --git a/hailo_model_zoo/cfg/alls/base/efficientnet_s.alls b/hailo_model_zoo/cfg/alls/generic/efficientnet_s.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/efficientnet_s.alls rename to hailo_model_zoo/cfg/alls/generic/efficientnet_s.alls diff --git a/hailo_model_zoo/cfg/alls/base/espcn_x2.alls b/hailo_model_zoo/cfg/alls/generic/espcn_x2.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/espcn_x2.alls rename to hailo_model_zoo/cfg/alls/generic/espcn_x2.alls diff --git a/hailo_model_zoo/cfg/alls/base/espcn_x3.alls b/hailo_model_zoo/cfg/alls/generic/espcn_x3.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/espcn_x3.alls rename to hailo_model_zoo/cfg/alls/generic/espcn_x3.alls diff --git a/hailo_model_zoo/cfg/alls/base/espcn_x4.alls b/hailo_model_zoo/cfg/alls/generic/espcn_x4.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/espcn_x4.alls rename to hailo_model_zoo/cfg/alls/generic/espcn_x4.alls diff --git a/hailo_model_zoo/cfg/alls/base/face_attr_resnet_v1_18.alls b/hailo_model_zoo/cfg/alls/generic/face_attr_resnet_v1_18.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/face_attr_resnet_v1_18.alls rename to hailo_model_zoo/cfg/alls/generic/face_attr_resnet_v1_18.alls diff --git a/hailo_model_zoo/cfg/alls/generic/face_attr_resnet_v1_18_nv12.alls b/hailo_model_zoo/cfg/alls/generic/face_attr_resnet_v1_18_nv12.alls new file mode 100644 index 00000000..468f5e62 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/face_attr_resnet_v1_18_nv12.alls @@ -0,0 +1,5 @@ +normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +model_optimization_flavor(optimization_level=2, compression_level=2) + +yuv_to_rgb1 = input_conversion(yuv_to_rgb) +reshape, resize, concat = input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) diff --git a/hailo_model_zoo/cfg/alls/generic/face_attr_resnet_v1_18_rgbx.alls b/hailo_model_zoo/cfg/alls/generic/face_attr_resnet_v1_18_rgbx.alls new file mode 100644 index 00000000..1ed7dda3 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/face_attr_resnet_v1_18_rgbx.alls @@ -0,0 +1,3 @@ +normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +model_optimization_flavor(optimization_level=2, compression_level=2) +reshape_rgb = input_conversion(input_layer1, tf_rgbx_to_hailo_rgb, emulator_support=True) diff --git a/hailo_model_zoo/cfg/alls/base/fast_depth.alls b/hailo_model_zoo/cfg/alls/generic/fast_depth.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/fast_depth.alls rename to hailo_model_zoo/cfg/alls/generic/fast_depth.alls diff --git a/hailo_model_zoo/cfg/alls/generic/fast_depth_nv12_fhd.alls b/hailo_model_zoo/cfg/alls/generic/fast_depth_nv12_fhd.alls new file mode 100644 index 00000000..aa9d4f20 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/fast_depth_nv12_fhd.alls @@ -0,0 +1,7 @@ +model_optimization_config(calibration, batch_size=8, calibset_size=128) +post_quantization_optimization(finetune, policy=disabled) +post_quantization_optimization(bias_correction, policy=enabled) +pre_quantization_optimization(activation_clipping, layers=[conv20], mode=manual, clipping_values=[0, 15]) +resize_input1 = resize_input([1080, 1920], input_layer1) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/fcn16_resnet_v1_18.alls b/hailo_model_zoo/cfg/alls/generic/fcn16_resnet_v1_18.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/fcn16_resnet_v1_18.alls rename to hailo_model_zoo/cfg/alls/generic/fcn16_resnet_v1_18.alls diff --git a/hailo_model_zoo/cfg/alls/base/fcn8_resnet_v1_18.alls b/hailo_model_zoo/cfg/alls/generic/fcn8_resnet_v1_18.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/fcn8_resnet_v1_18.alls rename to hailo_model_zoo/cfg/alls/generic/fcn8_resnet_v1_18.alls diff --git a/hailo_model_zoo/cfg/alls/base/fcn8_resnet_v1_22.alls b/hailo_model_zoo/cfg/alls/generic/fcn8_resnet_v1_22.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/fcn8_resnet_v1_22.alls rename to hailo_model_zoo/cfg/alls/generic/fcn8_resnet_v1_22.alls diff --git a/hailo_model_zoo/cfg/alls/base/hand_landmark_lite.alls b/hailo_model_zoo/cfg/alls/generic/hand_landmark_lite.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/hand_landmark_lite.alls rename to hailo_model_zoo/cfg/alls/generic/hand_landmark_lite.alls diff --git a/hailo_model_zoo/cfg/alls/base/hardnet68.alls b/hailo_model_zoo/cfg/alls/generic/hardnet39ds.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/hardnet68.alls rename to hailo_model_zoo/cfg/alls/generic/hardnet39ds.alls diff --git a/hailo_model_zoo/cfg/alls/base/person_attr_resnet_v1_18.alls b/hailo_model_zoo/cfg/alls/generic/hardnet68.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/person_attr_resnet_v1_18.alls rename to hailo_model_zoo/cfg/alls/generic/hardnet68.alls diff --git a/hailo_model_zoo/cfg/alls/base/inception_v1.alls b/hailo_model_zoo/cfg/alls/generic/inception_v1.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/inception_v1.alls rename to hailo_model_zoo/cfg/alls/generic/inception_v1.alls diff --git a/hailo_model_zoo/cfg/alls/base/lightface_slim.alls b/hailo_model_zoo/cfg/alls/generic/lightface_slim.alls similarity index 78% rename from hailo_model_zoo/cfg/alls/base/lightface_slim.alls rename to hailo_model_zoo/cfg/alls/generic/lightface_slim.alls index a2114734..d381521a 100644 --- a/hailo_model_zoo/cfg/alls/base/lightface_slim.alls +++ b/hailo_model_zoo/cfg/alls/generic/lightface_slim.alls @@ -1,4 +1,3 @@ normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) model_optimization_config(calibration, batch_size=8, calibset_size=16) post_quantization_optimization(finetune, policy=disabled) -quantization_param({output_layer*}, precision_mode=a8_w8) diff --git a/hailo_model_zoo/cfg/alls/generic/lightface_slim_nv12.alls b/hailo_model_zoo/cfg/alls/generic/lightface_slim_nv12.alls new file mode 100644 index 00000000..4c26b443 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/lightface_slim_nv12.alls @@ -0,0 +1,5 @@ +normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat = input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) +model_optimization_config(calibration, batch_size=8, calibset_size=16) +post_quantization_optimization(finetune, policy=disabled) diff --git a/hailo_model_zoo/cfg/alls/generic/lightface_slim_nv12_fhd.alls b/hailo_model_zoo/cfg/alls/generic/lightface_slim_nv12_fhd.alls new file mode 100644 index 00000000..0e2626ed --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/lightface_slim_nv12_fhd.alls @@ -0,0 +1,14 @@ +normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) +resize_input1 = resize_input([1080, 1920], input_layer1) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) +model_optimization_config(calibration, batch_size=8, calibset_size=16) +post_quantization_optimization(finetune, policy=disabled) +quantization_param(output_layer1, precision_mode=a8_w8) +quantization_param(output_layer2, precision_mode=a8_w8) +quantization_param(output_layer3, precision_mode=a8_w8) +quantization_param(output_layer4, precision_mode=a8_w8) +quantization_param(output_layer5, precision_mode=a8_w8) +quantization_param(output_layer6, precision_mode=a8_w8) +quantization_param(output_layer7, precision_mode=a8_w8) +quantization_param(output_layer8, precision_mode=a8_w8) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/lprnet.alls b/hailo_model_zoo/cfg/alls/generic/lprnet.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/lprnet.alls rename to hailo_model_zoo/cfg/alls/generic/lprnet.alls diff --git a/hailo_model_zoo/cfg/alls/base/lprnet_yuy2.alls b/hailo_model_zoo/cfg/alls/generic/lprnet_yuy2.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/lprnet_yuy2.alls rename to hailo_model_zoo/cfg/alls/generic/lprnet_yuy2.alls diff --git a/hailo_model_zoo/cfg/alls/base/mobilenet_v1.alls b/hailo_model_zoo/cfg/alls/generic/mobilenet_v1.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/mobilenet_v1.alls rename to hailo_model_zoo/cfg/alls/generic/mobilenet_v1.alls diff --git a/hailo_model_zoo/cfg/alls/base/mobilenet_v2_1.0.alls b/hailo_model_zoo/cfg/alls/generic/mobilenet_v2_1.0.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/mobilenet_v2_1.0.alls rename to hailo_model_zoo/cfg/alls/generic/mobilenet_v2_1.0.alls diff --git a/hailo_model_zoo/cfg/alls/base/mobilenet_v2_1.4.alls b/hailo_model_zoo/cfg/alls/generic/mobilenet_v2_1.4.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/mobilenet_v2_1.4.alls rename to hailo_model_zoo/cfg/alls/generic/mobilenet_v2_1.4.alls diff --git a/hailo_model_zoo/cfg/alls/base/mobilenet_v3.alls b/hailo_model_zoo/cfg/alls/generic/mobilenet_v3.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/mobilenet_v3.alls rename to hailo_model_zoo/cfg/alls/generic/mobilenet_v3.alls diff --git a/hailo_model_zoo/cfg/alls/base/mobilenet_v3_large_minimalistic.alls b/hailo_model_zoo/cfg/alls/generic/mobilenet_v3_large_minimalistic.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/mobilenet_v3_large_minimalistic.alls rename to hailo_model_zoo/cfg/alls/generic/mobilenet_v3_large_minimalistic.alls diff --git a/hailo_model_zoo/cfg/alls/base/mspn_regnetx_800mf.alls b/hailo_model_zoo/cfg/alls/generic/mspn_regnetx_800mf.alls similarity index 75% rename from hailo_model_zoo/cfg/alls/base/mspn_regnetx_800mf.alls rename to hailo_model_zoo/cfg/alls/generic/mspn_regnetx_800mf.alls index 055a6f72..6284eb35 100644 --- a/hailo_model_zoo/cfg/alls/base/mspn_regnetx_800mf.alls +++ b/hailo_model_zoo/cfg/alls/generic/mspn_regnetx_800mf.alls @@ -1,3 +1,2 @@ mspn_regnetx_800mf/normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) model_optimization_flavor(optimization_level=2, compression_level=1) -quantization_param({output_layer*}, precision_mode=a8_w8) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/mspn_regnetx_800mf_nv12.alls b/hailo_model_zoo/cfg/alls/generic/mspn_regnetx_800mf_nv12.alls new file mode 100644 index 00000000..03baffdb --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/mspn_regnetx_800mf_nv12.alls @@ -0,0 +1,5 @@ +mspn_regnetx_800mf_nv12/normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +model_optimization_flavor(optimization_level=2, compression_level=1) +quantization_param(output_layer1, precision_mode=a8_w8) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/nanodet_repvgg.alls b/hailo_model_zoo/cfg/alls/generic/nanodet_repvgg.alls similarity index 59% rename from hailo_model_zoo/cfg/alls/base/nanodet_repvgg.alls rename to hailo_model_zoo/cfg/alls/generic/nanodet_repvgg.alls index 52ac0809..db0d6e87 100644 --- a/hailo_model_zoo/cfg/alls/base/nanodet_repvgg.alls +++ b/hailo_model_zoo/cfg/alls/generic/nanodet_repvgg.alls @@ -1,4 +1,3 @@ normalization1 = normalization([103.53, 116.28, 123.675], [57.375, 57.12, 58.395]) model_optimization_config(calibration, batch_size=4, calibset_size=64) -quantization_param({output_layer*}, precision_mode=a8_w8) -input_conversion = input_conversion(bgr_to_rgb) \ No newline at end of file +input_conversion = input_conversion(bgr_to_rgb) diff --git a/hailo_model_zoo/cfg/alls/generic/nanodet_repvgg_a12.alls b/hailo_model_zoo/cfg/alls/generic/nanodet_repvgg_a12.alls new file mode 100644 index 00000000..1e7a7465 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/nanodet_repvgg_a12.alls @@ -0,0 +1,2 @@ +input_conversion = input_conversion(bgr_to_rgb) +normalization1 = normalization([0, 0, 0], [1, 1, 1]) diff --git a/hailo_model_zoo/cfg/alls/generic/nanodet_repvgg_a1_640.alls b/hailo_model_zoo/cfg/alls/generic/nanodet_repvgg_a1_640.alls new file mode 100644 index 00000000..6a2db652 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/nanodet_repvgg_a1_640.alls @@ -0,0 +1,2 @@ +normalization1 = normalization([103.53, 116.28, 123.675], [57.375, 57.12, 58.395]) +input_conversion = input_conversion(bgr_to_rgb) diff --git a/hailo_model_zoo/cfg/alls/base/osnet_x1_0.alls b/hailo_model_zoo/cfg/alls/generic/osnet_x1_0.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/osnet_x1_0.alls rename to hailo_model_zoo/cfg/alls/generic/osnet_x1_0.alls diff --git a/hailo_model_zoo/cfg/alls/base/regnetx_1.6gf.alls b/hailo_model_zoo/cfg/alls/generic/person_attr_resnet_v1_18.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/regnetx_1.6gf.alls rename to hailo_model_zoo/cfg/alls/generic/person_attr_resnet_v1_18.alls diff --git a/hailo_model_zoo/cfg/alls/generic/person_attr_resnet_v1_18_nv12.alls b/hailo_model_zoo/cfg/alls/generic/person_attr_resnet_v1_18_nv12.alls new file mode 100644 index 00000000..91f3acd1 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/person_attr_resnet_v1_18_nv12.alls @@ -0,0 +1,3 @@ +normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +yuv_to_rgb1 = input_conversion(yuv_to_rgb) +reshape, resize, concat = input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/person_attr_resnet_v1_18_rgbx.alls b/hailo_model_zoo/cfg/alls/generic/person_attr_resnet_v1_18_rgbx.alls new file mode 100644 index 00000000..33cbdc22 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/person_attr_resnet_v1_18_rgbx.alls @@ -0,0 +1,2 @@ +normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +reshape_rgb = input_conversion(input_layer1, tf_rgbx_to_hailo_rgb, emulator_support=True) diff --git a/hailo_model_zoo/cfg/alls/base/regnetx_800mf.alls b/hailo_model_zoo/cfg/alls/generic/regnetx_1.6gf.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/regnetx_800mf.alls rename to hailo_model_zoo/cfg/alls/generic/regnetx_1.6gf.alls diff --git a/hailo_model_zoo/cfg/alls/base/resnet_v2_34.alls b/hailo_model_zoo/cfg/alls/generic/regnetx_800mf.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/resnet_v2_34.alls rename to hailo_model_zoo/cfg/alls/generic/regnetx_800mf.alls diff --git a/hailo_model_zoo/cfg/alls/base/regnety_200mf.alls b/hailo_model_zoo/cfg/alls/generic/regnety_200mf.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/regnety_200mf.alls rename to hailo_model_zoo/cfg/alls/generic/regnety_200mf.alls diff --git a/hailo_model_zoo/cfg/alls/base/repvgg_a0_person_reid_2048.alls b/hailo_model_zoo/cfg/alls/generic/repvgg_a0_person_reid_2048.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/repvgg_a0_person_reid_2048.alls rename to hailo_model_zoo/cfg/alls/generic/repvgg_a0_person_reid_2048.alls diff --git a/hailo_model_zoo/cfg/alls/base/repvgg_a0_person_reid_512.alls b/hailo_model_zoo/cfg/alls/generic/repvgg_a0_person_reid_512.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/repvgg_a0_person_reid_512.alls rename to hailo_model_zoo/cfg/alls/generic/repvgg_a0_person_reid_512.alls diff --git a/hailo_model_zoo/cfg/alls/generic/repvgg_a1.alls b/hailo_model_zoo/cfg/alls/generic/repvgg_a1.alls new file mode 100644 index 00000000..6ef29f1d --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/repvgg_a1.alls @@ -0,0 +1,4 @@ +normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +post_quantization_optimization(finetune, policy=enabled, epochs=8, learning_rate=1e-3) +pre_quantization_optimization(activation_clipping, layers={conv7}, mode=percentile, clipping_values=[0, 99.99], recollect_stats=True) +model_optimization_config(calibration, batch_size=8, calibset_size=512) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/repvgg_a2.alls b/hailo_model_zoo/cfg/alls/generic/repvgg_a2.alls new file mode 100644 index 00000000..12594458 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/repvgg_a2.alls @@ -0,0 +1,4 @@ +normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +post_quantization_optimization(finetune, policy=enabled, epochs=12, learning_rate=1e-3) +pre_quantization_optimization(activation_clipping, layers={conv9}, mode=percentile, clipping_values=[0, 99.85], recollect_stats=True) +model_optimization_config(calibration, batch_size=8, calibset_size=512) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/resmlp12_relu.alls b/hailo_model_zoo/cfg/alls/generic/resmlp12_relu.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/resmlp12_relu.alls rename to hailo_model_zoo/cfg/alls/generic/resmlp12_relu.alls diff --git a/hailo_model_zoo/cfg/alls/base/resnet_v1_18.alls b/hailo_model_zoo/cfg/alls/generic/resnet_v1_18.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/resnet_v1_18.alls rename to hailo_model_zoo/cfg/alls/generic/resnet_v1_18.alls diff --git a/hailo_model_zoo/cfg/alls/base/resnet_v1_34.alls b/hailo_model_zoo/cfg/alls/generic/resnet_v1_34.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/resnet_v1_34.alls rename to hailo_model_zoo/cfg/alls/generic/resnet_v1_34.alls diff --git a/hailo_model_zoo/cfg/alls/base/resnet_v1_50.alls b/hailo_model_zoo/cfg/alls/generic/resnet_v1_50.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/resnet_v1_50.alls rename to hailo_model_zoo/cfg/alls/generic/resnet_v1_50.alls diff --git a/hailo_model_zoo/cfg/alls/base/resnet_v2_18.alls b/hailo_model_zoo/cfg/alls/generic/resnet_v2_18.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/resnet_v2_18.alls rename to hailo_model_zoo/cfg/alls/generic/resnet_v2_18.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolox_tiny.alls b/hailo_model_zoo/cfg/alls/generic/resnet_v2_34.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolox_tiny.alls rename to hailo_model_zoo/cfg/alls/generic/resnet_v2_34.alls diff --git a/hailo_model_zoo/cfg/alls/base/resnext26_32x4d.alls b/hailo_model_zoo/cfg/alls/generic/resnext26_32x4d.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/resnext26_32x4d.alls rename to hailo_model_zoo/cfg/alls/generic/resnext26_32x4d.alls diff --git a/hailo_model_zoo/cfg/alls/base/resnext50_32x4d.alls b/hailo_model_zoo/cfg/alls/generic/resnext50_32x4d.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/resnext50_32x4d.alls rename to hailo_model_zoo/cfg/alls/generic/resnext50_32x4d.alls diff --git a/hailo_model_zoo/cfg/alls/base/retinaface_mobilenet_v1.alls b/hailo_model_zoo/cfg/alls/generic/retinaface_mobilenet_v1.alls similarity index 92% rename from hailo_model_zoo/cfg/alls/base/retinaface_mobilenet_v1.alls rename to hailo_model_zoo/cfg/alls/generic/retinaface_mobilenet_v1.alls index 06a106fb..e2ae1233 100644 --- a/hailo_model_zoo/cfg/alls/base/retinaface_mobilenet_v1.alls +++ b/hailo_model_zoo/cfg/alls/generic/retinaface_mobilenet_v1.alls @@ -5,4 +5,3 @@ model_optimization_config(calibration, batch_size=2, calibset_size=16) quantization_param([conv1, conv2, conv3, conv4, conv5, conv6, conv7, conv8, conv9, conv10, conv11, conv12, conv13, conv14, conv15, conv16, conv17, conv18, conv19, conv20, conv21, conv22, conv23, conv24, conv25, conv26, conv27, conv28, conv29, conv30, conv31, conv32, conv33, conv34, conv35, conv36, conv37, conv38, conv39, conv40, conv41, conv42, conv43], bias_mode=single_scale_decomposition) post_quantization_optimization(finetune, policy=disabled) post_quantization_optimization(bias_correction, policy=enabled) -quantization_param({output_layer*}, precision_mode=a8_w8) diff --git a/hailo_model_zoo/cfg/alls/generic/retinaface_mobilenet_v1_rgbx.alls b/hailo_model_zoo/cfg/alls/generic/retinaface_mobilenet_v1_rgbx.alls new file mode 100644 index 00000000..43e88f01 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/retinaface_mobilenet_v1_rgbx.alls @@ -0,0 +1,8 @@ +normalization1 = normalization([104, 117, 123], [1.0, 1.0, 1.0]) +input_conversion = input_conversion(bgr_to_rgb) +reshape_rgb = input_conversion(input_layer1, tf_rgbx_to_hailo_rgb, emulator_support=True) + +model_optimization_config(calibration, batch_size=4, calibset_size=16) +quantization_param([conv1, conv2, conv3, conv4, conv5, conv6, conv7, conv8, conv9, conv10, conv11, conv12, conv13, conv14, conv15, conv16, conv17, conv18, conv19, conv20, conv21, conv22, conv23, conv24, conv25, conv26, conv27, conv28, conv29, conv30, conv31, conv32, conv33, conv34, conv35, conv36, conv37, conv38, conv39, conv40, conv41, conv42, conv43], bias_mode=single_scale_decomposition) +post_quantization_optimization(finetune, policy=disabled) +post_quantization_optimization(bias_correction, policy=enabled) diff --git a/hailo_model_zoo/cfg/alls/base/scrfd_10g.alls b/hailo_model_zoo/cfg/alls/generic/scrfd_10g.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/scrfd_10g.alls rename to hailo_model_zoo/cfg/alls/generic/scrfd_10g.alls diff --git a/hailo_model_zoo/cfg/alls/generic/scrfd_10g_nv12_fhd.alls b/hailo_model_zoo/cfg/alls/generic/scrfd_10g_nv12_fhd.alls new file mode 100644 index 00000000..679feb6d --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/scrfd_10g_nv12_fhd.alls @@ -0,0 +1,16 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [128.0, 128.0, 128.0]) +resize_input1 = resize_input([1080, 1920], input_layer1) +change_output_activation(conv41, sigmoid) +change_output_activation(conv49, sigmoid) +change_output_activation(conv56, sigmoid) +yuv_to_rgb1 = input_conversion(yuv_to_rgb) +reshape, resize, concat = input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support = True) +quantization_param(output_layer1, precision_mode=a8_w8) +quantization_param(output_layer2, precision_mode=a8_w8) +quantization_param(output_layer3, precision_mode=a8_w8) +quantization_param(output_layer4, precision_mode=a8_w8) +quantization_param(output_layer5, precision_mode=a8_w8) +quantization_param(output_layer6, precision_mode=a8_w8) +quantization_param(output_layer7, precision_mode=a8_w8) +quantization_param(output_layer8, precision_mode=a8_w8) +quantization_param(output_layer9, precision_mode=a8_w8) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/scrfd_2.5g.alls b/hailo_model_zoo/cfg/alls/generic/scrfd_2.5g.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/scrfd_2.5g.alls rename to hailo_model_zoo/cfg/alls/generic/scrfd_2.5g.alls diff --git a/hailo_model_zoo/cfg/alls/base/scrfd_500m.alls b/hailo_model_zoo/cfg/alls/generic/scrfd_500m.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/scrfd_500m.alls rename to hailo_model_zoo/cfg/alls/generic/scrfd_500m.alls diff --git a/hailo_model_zoo/cfg/alls/base/shufflenet_g8_w1.alls b/hailo_model_zoo/cfg/alls/generic/shufflenet_g8_w1.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/shufflenet_g8_w1.alls rename to hailo_model_zoo/cfg/alls/generic/shufflenet_g8_w1.alls diff --git a/hailo_model_zoo/cfg/alls/base/squeezenet_v1.1.alls b/hailo_model_zoo/cfg/alls/generic/squeezenet_v1.1.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/squeezenet_v1.1.alls rename to hailo_model_zoo/cfg/alls/generic/squeezenet_v1.1.alls diff --git a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1.alls b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1.alls similarity index 92% rename from hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1.alls rename to hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1.alls index f11caa73..20c90924 100644 --- a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1.alls +++ b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1.alls @@ -1,6 +1,5 @@ normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) -nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json", ssd) -context_switch_param(mode=disabled) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json", ssd, engine=nn_core) quantization_param({conv*}, bias_mode=single_scale_decomposition) post_quantization_optimization(finetune, policy=enabled, dataset_size=4000, epochs=8, learning_rate=0.0001, loss_layer_names=[bbox_decoder13, conv14, bbox_decoder17, conv18, bbox_decoder21, conv22, bbox_decoder25, conv26, bbox_decoder29, conv30, bbox_decoder33, conv34, conv32, conv24, conv28, conv12, conv20, conv16], diff --git a/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_hd.alls b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_hd.alls new file mode 100644 index 00000000..c271ec8b --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_hd.alls @@ -0,0 +1,11 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2023-04-25/mobilenet_ssd_hd_nms_postprocess_config.json", ssd, engine=cpu) +change_output_activation(conv14, sigmoid) +change_output_activation(conv18, sigmoid) +change_output_activation(conv22, sigmoid) +change_output_activation(conv26, sigmoid) +change_output_activation(conv30, sigmoid) +change_output_activation(conv34, sigmoid) +model_optimization_config(calibration, batch_size=1, calibset_size=32) +post_quantization_optimization(finetune, policy=disabled) +post_quantization_optimization(bias_correction, policy=enabled) diff --git a/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_no_alls.alls b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_no_alls.alls new file mode 100644 index 00000000..c95b225c --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_no_alls.alls @@ -0,0 +1,3 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json", ssd, engine=nn_core) +post_quantization_optimization(finetune, policy=enabled, loss_factors=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], dataset_size=4000, epochs=4, learning_rate=0.0001, loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2], loss_layer_names=[bbox_decoder13, conv14, bbox_decoder17, conv18, bbox_decoder21, conv22, bbox_decoder25, conv26, bbox_decoder29, conv30, bbox_decoder33, conv34, conv32, conv24, conv28, conv12, conv20, conv16]) diff --git a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_visdrone.alls b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_visdrone.alls similarity index 71% rename from hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_visdrone.alls rename to hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_visdrone.alls index fe393338..5a1e4b83 100644 --- a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_visdrone.alls +++ b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v1_visdrone.alls @@ -1,6 +1,5 @@ normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) -nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2021-07-11/mobilenet_ssd_nms_visdrone_postprocess_config.json", ssd) -context_switch_param(mode=disabled) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2023-06-07/mobilenet_ssd_nms_visdrone_postprocess_config.json", ssd, engine=nn_core) model_optimization_config(calibration, batch_size=8, calibset_size=32) quantization_param({conv*}, bias_mode=single_scale_decomposition) post_quantization_optimization(finetune, policy=disabled) diff --git a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v2.alls b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v2.alls similarity index 73% rename from hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v2.alls rename to hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v2.alls index 74277f51..95a221a2 100644 --- a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v2.alls +++ b/hailo_model_zoo/cfg/alls/generic/ssd_mobilenet_v2.alls @@ -1,5 +1,5 @@ normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) -nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2021-07-11/mobilenet_v2_ssd_nms_postprocess_config.json", ssd) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2023-03-16/mobilenet_v2_ssd_nms_postprocess_config.json", ssd, engine=nn_core) model_optimization_config(calibration, batch_size=8, calibset_size=32) post_quantization_optimization(finetune, policy=disabled) post_quantization_optimization(bias_correction, policy=enabled) diff --git a/hailo_model_zoo/cfg/alls/generic/stdc1.alls b/hailo_model_zoo/cfg/alls/generic/stdc1.alls new file mode 100644 index 00000000..6fbdd467 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/stdc1.alls @@ -0,0 +1,3 @@ +stdc1/normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +model_optimization_config(calibration, batch_size=1, calibset_size=64) +post_quantization_optimization(finetune, policy=enabled, dataset_size=512, epochs=6, loss_layer_names=[conv33], loss_types=[l2]) diff --git a/hailo_model_zoo/cfg/alls/base/tddfa_mobilenet_v1.alls b/hailo_model_zoo/cfg/alls/generic/tddfa_mobilenet_v1.alls similarity index 80% rename from hailo_model_zoo/cfg/alls/base/tddfa_mobilenet_v1.alls rename to hailo_model_zoo/cfg/alls/generic/tddfa_mobilenet_v1.alls index 7e942782..360c6ebf 100644 --- a/hailo_model_zoo/cfg/alls/base/tddfa_mobilenet_v1.alls +++ b/hailo_model_zoo/cfg/alls/generic/tddfa_mobilenet_v1.alls @@ -2,4 +2,3 @@ model_optimization_config(calibration, batch_size=2, calibset_size=64) post_quantization_optimization(finetune, policy=disabled) post_quantization_optimization(bias_correction, policy=enabled) input_conversion = input_conversion(bgr_to_rgb) -quantization_param({output_layer*}, precision_mode=a8_w8) diff --git a/hailo_model_zoo/cfg/alls/generic/tddfa_mobilenet_v1_nv12.alls b/hailo_model_zoo/cfg/alls/generic/tddfa_mobilenet_v1_nv12.alls new file mode 100644 index 00000000..8e95eef0 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/tddfa_mobilenet_v1_nv12.alls @@ -0,0 +1,8 @@ +model_optimization_config(calibration, batch_size=2, calibset_size=64) +post_quantization_optimization(finetune, policy=disabled) +post_quantization_optimization(bias_correction, policy=enabled) +quantization_param(output_layer1, precision_mode=a8_w8) + +input_conversion = input_conversion(bgr_to_rgb) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/tiny_yolov3.alls b/hailo_model_zoo/cfg/alls/generic/tiny_yolov3.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/tiny_yolov3.alls rename to hailo_model_zoo/cfg/alls/generic/tiny_yolov3.alls diff --git a/hailo_model_zoo/cfg/alls/base/tiny_yolov4.alls b/hailo_model_zoo/cfg/alls/generic/tiny_yolov4.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/tiny_yolov4.alls rename to hailo_model_zoo/cfg/alls/generic/tiny_yolov4.alls diff --git a/hailo_model_zoo/cfg/alls/base/tiny_yolov4_license_plates.alls b/hailo_model_zoo/cfg/alls/generic/tiny_yolov4_license_plates.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/tiny_yolov4_license_plates.alls rename to hailo_model_zoo/cfg/alls/generic/tiny_yolov4_license_plates.alls diff --git a/hailo_model_zoo/cfg/alls/base/tiny_yolov4_license_plates_yuy2.alls b/hailo_model_zoo/cfg/alls/generic/tiny_yolov4_license_plates_yuy2.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/tiny_yolov4_license_plates_yuy2.alls rename to hailo_model_zoo/cfg/alls/generic/tiny_yolov4_license_plates_yuy2.alls diff --git a/hailo_model_zoo/cfg/alls/base/unet_mobilenet_v2.alls b/hailo_model_zoo/cfg/alls/generic/unet_mobilenet_v2.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/unet_mobilenet_v2.alls rename to hailo_model_zoo/cfg/alls/generic/unet_mobilenet_v2.alls diff --git a/hailo_model_zoo/cfg/alls/generic/vit_base.alls b/hailo_model_zoo/cfg/alls/generic/vit_base.alls new file mode 100644 index 00000000..1e052124 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/vit_base.alls @@ -0,0 +1,40 @@ +# model_optimization_config commands +model_optimization_config(calibration, batch_size=16, calibset_size=64) +post_quantization_optimization(finetune, policy=enabled, batch_size=4) +pre_quantization_optimization(equalization, policy=enabled) +model_optimization_flavor(optimization_level=2, compression_level=0) +normalization0 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) + +pre_quantization_optimization(activation_clipping, layers=[conv49], mode=percentile, clipping_values=[0.01, 99.9]) +pre_quantization_optimization(activation_clipping, layers=[conv47], mode=percentile, clipping_values=[0.01, 99.5]) +pre_quantization_optimization(activation_clipping, layers=[conv43], mode=percentile, clipping_values=[0.01, 99.5]) +pre_quantization_optimization(activation_clipping, layers=[conv39], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv37], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv35], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv33], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv31], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv29], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv27], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv25], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv23], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv21], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv19], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv17], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv15], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv13], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv11], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv9], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv7], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv5], mode=percentile, clipping_values=[0.01, 99.7]) +pre_quantization_optimization(activation_clipping, layers=[conv3], mode=percentile, clipping_values=[0.01, 99.7]) + +pre_quantization_optimization(activation_clipping, layers=[conv4], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv8], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv12], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv16], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv20], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv24], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv28], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv40], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv44], mode=percentile, clipping_values=[0.01, 99.99]) +pre_quantization_optimization(activation_clipping, layers=[conv48], mode=percentile, clipping_values=[0.01, 99.99]) diff --git a/hailo_model_zoo/cfg/alls/generic/vit_small.alls b/hailo_model_zoo/cfg/alls/generic/vit_small.alls new file mode 100644 index 00000000..45918d18 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/vit_small.alls @@ -0,0 +1,6 @@ +# model_optimization_config commands +model_optimization_config(calibration, batch_size=16, calibset_size=64) +post_quantization_optimization(finetune, policy=enabled, batch_size=4) +pre_quantization_optimization(equalization, policy=enabled) +model_optimization_flavor(optimization_level=2, compression_level=0) +normalization0 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/vit_tiny.alls b/hailo_model_zoo/cfg/alls/generic/vit_tiny.alls new file mode 100644 index 00000000..18348d53 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/vit_tiny.alls @@ -0,0 +1,6 @@ +# model_optimization_config commands +model_optimization_config(calibration, batch_size=16, calibset_size=64) +post_quantization_optimization(finetune, policy=enabled) +pre_quantization_optimization(equalization, policy=enabled) +model_optimization_flavor(optimization_level=2, compression_level=0) +normalization0 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) diff --git a/hailo_model_zoo/cfg/alls/base/yolact_mobilenet_v1.alls b/hailo_model_zoo/cfg/alls/generic/yolact_mobilenet_v1.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolact_mobilenet_v1.alls rename to hailo_model_zoo/cfg/alls/generic/yolact_mobilenet_v1.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolact_regnetx_1.6gf.alls b/hailo_model_zoo/cfg/alls/generic/yolact_regnetx_1.6gf.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolact_regnetx_1.6gf.alls rename to hailo_model_zoo/cfg/alls/generic/yolact_regnetx_1.6gf.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolact_regnetx_600mf_d2s_31classes.alls b/hailo_model_zoo/cfg/alls/generic/yolact_regnetx_600mf_d2s_31classes.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolact_regnetx_600mf_d2s_31classes.alls rename to hailo_model_zoo/cfg/alls/generic/yolact_regnetx_600mf_d2s_31classes.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolact_regnetx_800mf.alls b/hailo_model_zoo/cfg/alls/generic/yolact_regnetx_800mf.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolact_regnetx_800mf.alls rename to hailo_model_zoo/cfg/alls/generic/yolact_regnetx_800mf.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolact_regnetx_800mf_20classes.alls b/hailo_model_zoo/cfg/alls/generic/yolact_regnetx_800mf_20classes.alls similarity index 89% rename from hailo_model_zoo/cfg/alls/base/yolact_regnetx_800mf_20classes.alls rename to hailo_model_zoo/cfg/alls/generic/yolact_regnetx_800mf_20classes.alls index fbebd677..686ce79f 100644 --- a/hailo_model_zoo/cfg/alls/base/yolact_regnetx_800mf_20classes.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolact_regnetx_800mf_20classes.alls @@ -5,4 +5,3 @@ change_output_activation(yolact_regnetx_800mf_20classes/conv65, tanh) change_output_activation(yolact_regnetx_800mf_20classes/conv68, tanh) change_output_activation(yolact_regnetx_800mf_20classes/conv71, tanh) model_optimization_config(calibration, batch_size=4, calibset_size=64) -quantization_param({output_layer*}, precision_mode=a8_w8) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov3.alls b/hailo_model_zoo/cfg/alls/generic/yolov3.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov3.alls rename to hailo_model_zoo/cfg/alls/generic/yolov3.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolov3_416.alls b/hailo_model_zoo/cfg/alls/generic/yolov3_416.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov3_416.alls rename to hailo_model_zoo/cfg/alls/generic/yolov3_416.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolov3_gluon.alls b/hailo_model_zoo/cfg/alls/generic/yolov3_gluon.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov3_gluon.alls rename to hailo_model_zoo/cfg/alls/generic/yolov3_gluon.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolov3_gluon_416.alls b/hailo_model_zoo/cfg/alls/generic/yolov3_gluon_416.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov3_gluon_416.alls rename to hailo_model_zoo/cfg/alls/generic/yolov3_gluon_416.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolov4_leaky.alls b/hailo_model_zoo/cfg/alls/generic/yolov4_leaky.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov4_leaky.alls rename to hailo_model_zoo/cfg/alls/generic/yolov4_leaky.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolov5l.alls b/hailo_model_zoo/cfg/alls/generic/yolov5l.alls similarity index 75% rename from hailo_model_zoo/cfg/alls/base/yolov5l.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5l.alls index 5a868b19..3d491826 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5l.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5l.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5l_spp/pretrained/2023-04-25/yolov5l_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=2, calibset_size=64) pre_quantization_optimization(ew_add_fusing, policy=enabled, infusible_ew_add_type=conv) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=2, dataset_size=1000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv118, conv107, conv95]) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5l_seg.alls b/hailo_model_zoo/cfg/alls/generic/yolov5l_seg.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov5l_seg.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5l_seg.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m_hpp.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m.alls similarity index 90% rename from hailo_model_zoo/cfg/alls/base/yolov5m_hpp.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5m.alls index 5fc80d41..f0c9eee1 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5m_hpp.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m.alls @@ -1,6 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) -nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2022-01-02/yolov5m_nms_config.json", yolov5, engine=cpu) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) quantization_param(conv45, precision_mode=a8_w4) quantization_param(conv46, precision_mode=a8_w4) @@ -9,4 +9,4 @@ quantization_param(conv53, precision_mode=a8_w4) quantization_param(conv84, precision_mode=a8_w4) quantization_param(conv89, precision_mode=a8_w4) quantization_param(conv91, precision_mode=a8_w4) -post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m6_6.1.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m6_6.1.alls similarity index 72% rename from hailo_model_zoo/cfg/alls/base/yolov5m6_6.1.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5m6_6.1.alls index 192e0d7f..e4d7eb59 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5m6_6.1.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m6_6.1.alls @@ -1,4 +1,5 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/ models_files/ObjectDetection/Detection-COCO/yolo/yolov5m6_6.1/pretrained/2023-04-25/yolov5m6_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=1, calibset_size=64) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel, l2rel], loss_layer_names=[conv107, conv99, conv90, conv81]) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m_6.1.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_6.1.alls similarity index 66% rename from hailo_model_zoo/cfg/alls/base/yolov5m_6.1.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5m_6.1.alls index a8dc0ba6..9e33d5ac 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5m_6.1.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m_6.1.alls @@ -1,8 +1,6 @@ yolov5m_6_1/normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) - change_output_activation(yolov5m_6_1/conv82, sigmoid) change_output_activation(yolov5m_6_1/conv74, sigmoid) change_output_activation(yolov5m_6_1/conv65, sigmoid) - +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_6.1/pretrained/2023-04-25/yolov5m_6.1_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) - diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m_seg.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_seg.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov5m_seg.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5m_seg.alls diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles.alls new file mode 100644 index 00000000..1874a7f0 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles.alls @@ -0,0 +1,15 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +resize_input1 = resize_input([1080, 1920], input_layer1) +change_output_activation(sigmoid) +model_optimization_config(calibration, batch_size=4, calibset_size=64) +quantization_param(conv45, precision_mode=a8_w4) +quantization_param(conv46, precision_mode=a8_w4) +quantization_param(conv51, precision_mode=a8_w4) +quantization_param(conv53, precision_mode=a8_w4) +quantization_param(conv84, precision_mode=a8_w4) +quantization_param(conv89, precision_mode=a8_w4) +quantization_param(conv91, precision_mode=a8_w4) +pre_quantization_optimization(weights_clipping, layers=[conv75], mode=manual, clipping_values=[-32.52, 32.52]) +pre_quantization_optimization(weights_clipping, layers=[conv85], mode=manual, clipping_values=[-26.61, 26.61]) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json", yolov5, engine=cpu) diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles_nv12.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles_nv12.alls new file mode 100644 index 00000000..575aa108 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles_nv12.alls @@ -0,0 +1,17 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +resize_input1 = resize_input([1080, 1920], input_layer1) +model_optimization_config(calibration, batch_size=4, calibset_size=64) +quantization_param(conv45, precision_mode=a8_w4) +quantization_param(conv46, precision_mode=a8_w4) +quantization_param(conv51, precision_mode=a8_w4) +quantization_param(conv53, precision_mode=a8_w4) +quantization_param(conv84, precision_mode=a8_w4) +quantization_param(conv89, precision_mode=a8_w4) +quantization_param(conv91, precision_mode=a8_w4) +pre_quantization_optimization(weights_clipping, layers=[conv75], mode=manual, clipping_values=[-32.52, 32.52]) +pre_quantization_optimization(weights_clipping, layers=[conv85], mode=manual, clipping_values=[-26.61, 26.61]) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json", yolov5, engine=cpu) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m_vehicles_yuy2.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles_yuy2.alls similarity index 70% rename from hailo_model_zoo/cfg/alls/base/yolov5m_vehicles_yuy2.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles_yuy2.alls index 6ef48d0f..5db394f2 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5m_vehicles_yuy2.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m_vehicles_yuy2.alls @@ -9,7 +9,9 @@ quantization_param(conv53, precision_mode=a8_w4) quantization_param(conv84, precision_mode=a8_w4) quantization_param(conv89, precision_mode=a8_w4) quantization_param(conv91, precision_mode=a8_w4) -quantization_param({output_layer*}, precision_mode=a8_w8) +pre_quantization_optimization(weights_clipping, layers=[conv75], mode=manual, clipping_values=[-32.52, 32.52]) +pre_quantization_optimization(weights_clipping, layers=[conv85], mode=manual, clipping_values=[-26.61, 26.61]) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) yuv_to_rgb1 = yuv_to_rgb() reshape_yuy2 = input_conversion(input_layer1, yuy2_to_hailo_yuv, emulator_support=True) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json", yolov5, engine=cpu) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp.alls similarity index 80% rename from hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp.alls index e81c9122..86caadf5 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) quantization_param(conv45, precision_mode=a8_w4) quantization_param(conv46, precision_mode=a8_w4) @@ -8,4 +9,4 @@ quantization_param(conv52, precision_mode=a8_w4) quantization_param(conv83, precision_mode=a8_w4) quantization_param(conv88, precision_mode=a8_w4) quantization_param(conv90, precision_mode=a8_w4) -post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv93, conv84, conv74]) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv93, conv84, conv74]) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp_60p.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_60p.alls similarity index 91% rename from hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp_60p.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_60p.alls index cdeb23a3..241ea388 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp_60p.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_60p.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) post_quantization_optimization(bias_correction, policy=disabled) post_quantization_optimization(finetune, policy=enabled, meta_arch=yolo, dataset_size=4096, batch_size=4, epochs=5, learning_rate=0.0002, loss_layer_names=[conv92, conv93, conv82, conv84, conv72, conv74], loss_types=[l2rel, l2rel, l2rel, l2rel, l2rel, l2rel]) diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_60p_nv12_fhd.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_60p_nv12_fhd.alls new file mode 100644 index 00000000..a60ae2ff --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_60p_nv12_fhd.alls @@ -0,0 +1,35 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +resize_input1 = resize_input([1080, 1920], input_layer1) +model_optimization_config(calibration, batch_size=4, calibset_size=64) +post_quantization_optimization(bias_correction, policy=disabled) +post_quantization_optimization(finetune, policy=enabled, meta_arch=yolo, dataset_size=4096, batch_size=4, epochs=5, learning_rate=0.0002, loss_layer_names=[conv92, conv93, conv82, conv84, conv72, conv74], loss_types=[l2rel, l2rel, l2rel, l2rel, l2rel, l2rel]) +quantization_param(conv28, precision_mode=a8_w4) +quantization_param(conv32, precision_mode=a8_w4) +quantization_param(conv34, precision_mode=a8_w4) +quantization_param(conv36, precision_mode=a8_w4) +quantization_param(conv38, precision_mode=a8_w4) +quantization_param(conv40, precision_mode=a8_w4) +quantization_param(conv42, precision_mode=a8_w4) +quantization_param(conv45, precision_mode=a8_w4) +quantization_param(conv46, precision_mode=a8_w4) +quantization_param(conv50, precision_mode=a8_w4) +quantization_param(conv52, precision_mode=a8_w4) +quantization_param(conv54, precision_mode=a8_w4) +quantization_param(conv55, precision_mode=a8_w4) +quantization_param(conv59, precision_mode=a8_w4) +quantization_param(conv61, precision_mode=a8_w4) +quantization_param(conv73, precision_mode=a8_w4) +quantization_param(conv78, precision_mode=a8_w4) +quantization_param(conv80, precision_mode=a8_w4) +quantization_param(conv83, precision_mode=a8_w4) +quantization_param(conv85, precision_mode=a8_w4) +quantization_param(conv86, precision_mode=a8_w4) +quantization_param(conv88, precision_mode=a8_w4) +quantization_param(conv90, precision_mode=a8_w4) +quantization_param(conv92, precision_mode=a8_w4) +quantization_param(output_layer1, precision_mode=a8_w8) +quantization_param(output_layer2, precision_mode=a8_w8) +quantization_param(output_layer3, precision_mode=a8_w8) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_yuy2.alls b/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_yuy2.alls new file mode 100644 index 00000000..98dbb018 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5m_wo_spp_yuy2.alls @@ -0,0 +1,18 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +yuv_to_rgb1 = yuv_to_rgb(input_layer1) +resize_input1 = resize_input([720, 1280], input_layer1) +reshape_yuy2 = input_conversion(input_layer1, yuy2_to_hailo_yuv, emulator_support=True) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) + +model_optimization_config(calibration, batch_size=4, calibset_size=64) +quantization_param(conv45, precision_mode=a8_w4) +quantization_param(conv46, precision_mode=a8_w4) +quantization_param(conv50, precision_mode=a8_w4) +quantization_param(conv52, precision_mode=a8_w4) +quantization_param(conv83, precision_mode=a8_w4) +quantization_param(conv88, precision_mode=a8_w4) +quantization_param(conv90, precision_mode=a8_w4) + +# post_quantization_optimization commands +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv93, conv84, conv74])) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5n6_6.1.alls b/hailo_model_zoo/cfg/alls/generic/yolov5n6_6.1.alls similarity index 72% rename from hailo_model_zoo/cfg/alls/base/yolov5n6_6.1.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5n6_6.1.alls index e03e662a..07a42c3a 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5n6_6.1.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5n6_6.1.alls @@ -1,4 +1,5 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5n6_6.1/pretrained/2023-04-25/yolov5n6_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=2) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, batch_size=2, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel, l2rel], loss_layer_names=[conv79, conv73, conv66, conv59]) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5n_seg.alls b/hailo_model_zoo/cfg/alls/generic/yolov5n_seg.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov5n_seg.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5n_seg.alls diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5n_seg_nv12_fhd.alls b/hailo_model_zoo/cfg/alls/generic/yolov5n_seg_nv12_fhd.alls new file mode 100644 index 00000000..02d962e5 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5n_seg_nv12_fhd.alls @@ -0,0 +1,8 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +quantization_param(output_layer1, precision_mode=a8_w8) +quantization_param(output_layer2, precision_mode=a8_w8) +quantization_param(output_layer3, precision_mode=a8_w8) +quantization_param(output_layer4, precision_mode=a8_w8) +resize_input1 = resize_input([1080, 1920], input_layer1) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5s.alls b/hailo_model_zoo/cfg/alls/generic/yolov5s.alls new file mode 100644 index 00000000..ef3b2a42 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5s.alls @@ -0,0 +1,4 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_spp/pretrained/2023-04-25/yolov5s_nms_config.json", yolov5, engine=cpu) +model_optimization_config(calibration, batch_size=4) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov5s6_6.1.alls b/hailo_model_zoo/cfg/alls/generic/yolov5s6_6.1.alls similarity index 72% rename from hailo_model_zoo/cfg/alls/base/yolov5s6_6.1.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5s6_6.1.alls index 820fe135..20c54b67 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5s6_6.1.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5s6_6.1.alls @@ -1,4 +1,5 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5s6_6.1/pretrained/2023-04-25/yolov5s6_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=2, calibset_size=64) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel, l2rel], loss_layer_names=[conv79, conv73, conv66, conv59]) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5s_c3tr.alls b/hailo_model_zoo/cfg/alls/generic/yolov5s_c3tr.alls similarity index 52% rename from hailo_model_zoo/cfg/alls/base/yolov5s_c3tr.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5s_c3tr.alls index 732b5df5..0519e0e7 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5s_c3tr.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5s_c3tr.alls @@ -1,3 +1,4 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_c3tr/pretrained/2023-04-25/yolov5s_c3tr_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5s_personface.alls b/hailo_model_zoo/cfg/alls/generic/yolov5s_personface.alls similarity index 67% rename from hailo_model_zoo/cfg/alls/base/yolov5s_personface.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5s_personface.alls index 61933122..7549f150 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5s_personface.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5s_personface.alls @@ -1,3 +1,4 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.json", yolov5, engine=cpu) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv70, conv63, conv55]) diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_nv12.alls b/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_nv12.alls new file mode 100644 index 00000000..a287c634 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_nv12.alls @@ -0,0 +1,6 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv70, conv63, conv55]) +yuv_to_rgb1 = input_conversion(yuv_to_rgb) +reshape, resize, concat = input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support = True) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.json", yolov5, engine=cpu) diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_nv12_fhd.alls b/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_nv12_fhd.alls new file mode 100644 index 00000000..c9e17bca --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_nv12_fhd.alls @@ -0,0 +1,9 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +resize_input1 = resize_input([1080, 1920], input_layer1) +quantization_param(output_layer1, precision_mode=a8_w8) +quantization_param(output_layer2, precision_mode=a8_w8) +quantization_param(output_layer3, precision_mode=a8_w8) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv70, conv63, conv55]) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_rgbx.alls b/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_rgbx.alls new file mode 100644 index 00000000..9d959fa7 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5s_personface_rgbx.alls @@ -0,0 +1,5 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv70, conv63, conv55]) +reshape_rgb = input_conversion(input_layer1, tf_rgbx_to_hailo_rgb, emulator_support=True) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.json", yolov5, engine=cpu) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5s_seg.alls b/hailo_model_zoo/cfg/alls/generic/yolov5s_seg.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov5s_seg.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5s_seg.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolov5xs_wo_spp.alls b/hailo_model_zoo/cfg/alls/generic/yolov5xs_wo_spp.alls similarity index 64% rename from hailo_model_zoo/cfg/alls/base/yolov5xs_wo_spp.alls rename to hailo_model_zoo/cfg/alls/generic/yolov5xs_wo_spp.alls index 818385ff..366cc2e9 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5xs_wo_spp.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov5xs_wo_spp.alls @@ -1,4 +1,5 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2023-04-25/yolov5xs_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0002, epochs=8, dataset_size=2048) diff --git a/hailo_model_zoo/cfg/alls/generic/yolov5xs_wo_spp_nms_core.alls b/hailo_model_zoo/cfg/alls/generic/yolov5xs_wo_spp_nms_core.alls new file mode 100644 index 00000000..ae5059ba --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov5xs_wo_spp_nms_core.alls @@ -0,0 +1,5 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2022-05-10/yolov5xs_wo_spp_nms_config.json", yolov5) +model_optimization_config(calibration, batch_size=2, calibset_size=64) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv69, conv61, conv53]) diff --git a/hailo_model_zoo/cfg/alls/generic/yolov6n.alls b/hailo_model_zoo/cfg/alls/generic/yolov6n.alls new file mode 100644 index 00000000..80d63eac --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov6n.alls @@ -0,0 +1,4 @@ +model_optimization_config(calibration, batch_size=2, calibset_size=64) + +post_quantization_optimization(finetune, policy=enabled, loss_factors=[0.125, 2, 0.25, 0.125, 2, 0.25, 0.125, 2, 0.25, 1, 1, 1], dataset_size=4000, epochs=8, learning_rate=1e-5, loss_layer_names=[conv36, conv37, conv38, conv47, conv48, conv49, conv57, conv58, conv59, conv33, conv43, conv54], loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2, l2rel, l2rel, l2rel]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov6n/pretrained/2023-05-31/nms_config_yolov6n.json", yolox, engine=cpu) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/yolov6n_0.2.1.alls b/hailo_model_zoo/cfg/alls/generic/yolov6n_0.2.1.alls new file mode 100644 index 00000000..e69de29b diff --git a/hailo_model_zoo/cfg/alls/base/yolov7.alls b/hailo_model_zoo/cfg/alls/generic/yolov7.alls similarity index 83% rename from hailo_model_zoo/cfg/alls/base/yolov7.alls rename to hailo_model_zoo/cfg/alls/generic/yolov7.alls index e42353ef..9ce7086d 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov7.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov7.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov7/pretrained/2023-04-25/yolov7_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=2, calibset_size=512) pre_quantization_optimization(activation_clipping, layers={*}, mode=percentile, clipping_values=[0, 99.99]) pre_quantization_optimization(activation_clipping, layers=[yolov7/maxpool1, yolov7/maxpool2, yolov7/maxpool3, yolov7/maxpool4, yolov7/maxpool5, yolov7/maxpool6, yolov7/maxpool7, yolov7/maxpool8, yolov7/maxpool8], mode=disabled) diff --git a/hailo_model_zoo/cfg/alls/generic/yolov7_tiny.alls b/hailo_model_zoo/cfg/alls/generic/yolov7_tiny.alls new file mode 100644 index 00000000..d78471c2 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov7_tiny.alls @@ -0,0 +1,3 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov7_tiny/pretrained/2023-04-25/yolov7_tiny_nms_config.json", yolov5, engine=cpu) diff --git a/hailo_model_zoo/cfg/alls/base/yolov7e6.alls b/hailo_model_zoo/cfg/alls/generic/yolov7e6.alls similarity index 66% rename from hailo_model_zoo/cfg/alls/base/yolov7e6.alls rename to hailo_model_zoo/cfg/alls/generic/yolov7e6.alls index b51369a8..5be31f09 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov7e6.alls +++ b/hailo_model_zoo/cfg/alls/generic/yolov7e6.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov7e6/pretrained/2023-04-25/yolov7e6_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=1, calibset_size=64) post_quantization_optimization(finetune, policy=enabled, batch_size=1) model_optimization_config(checker_cfg, policy=disabled) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov8l.alls b/hailo_model_zoo/cfg/alls/generic/yolov8l.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov8l.alls rename to hailo_model_zoo/cfg/alls/generic/yolov8l.alls diff --git a/hailo_model_zoo/cfg/alls/base/yolov8m.alls b/hailo_model_zoo/cfg/alls/generic/yolov8m.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov8m.alls rename to hailo_model_zoo/cfg/alls/generic/yolov8m.alls diff --git a/hailo_model_zoo/cfg/alls/generic/yolov8m_seg.alls b/hailo_model_zoo/cfg/alls/generic/yolov8m_seg.alls new file mode 100644 index 00000000..c5d357e6 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov8m_seg.alls @@ -0,0 +1,4 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(conv61, sigmoid) +change_output_activation(conv79, sigmoid) +change_output_activation(conv94, sigmoid) diff --git a/hailo_model_zoo/cfg/alls/base/yolov8n.alls b/hailo_model_zoo/cfg/alls/generic/yolov8n.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov8n.alls rename to hailo_model_zoo/cfg/alls/generic/yolov8n.alls diff --git a/hailo_model_zoo/cfg/alls/generic/yolov8n_seg.alls b/hailo_model_zoo/cfg/alls/generic/yolov8n_seg.alls new file mode 100644 index 00000000..33c8df5d --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov8n_seg.alls @@ -0,0 +1,4 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(conv45, sigmoid) +change_output_activation(conv61, sigmoid) +change_output_activation(conv74, sigmoid) diff --git a/hailo_model_zoo/cfg/alls/base/yolov8s.alls b/hailo_model_zoo/cfg/alls/generic/yolov8s.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov8s.alls rename to hailo_model_zoo/cfg/alls/generic/yolov8s.alls diff --git a/hailo_model_zoo/cfg/alls/generic/yolov8s_seg.alls b/hailo_model_zoo/cfg/alls/generic/yolov8s_seg.alls new file mode 100644 index 00000000..33c8df5d --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolov8s_seg.alls @@ -0,0 +1,4 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(conv45, sigmoid) +change_output_activation(conv61, sigmoid) +change_output_activation(conv74, sigmoid) diff --git a/hailo_model_zoo/cfg/alls/base/yolov8x.alls b/hailo_model_zoo/cfg/alls/generic/yolov8x.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/yolov8x.alls rename to hailo_model_zoo/cfg/alls/generic/yolov8x.alls diff --git a/hailo_model_zoo/cfg/alls/generic/yolox_l_leaky.alls b/hailo_model_zoo/cfg/alls/generic/yolox_l_leaky.alls new file mode 100644 index 00000000..0ece39b5 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolox_l_leaky.alls @@ -0,0 +1,16 @@ +model_optimization_config(calibration, batch_size=2, calibset_size=64) +input_conversion = input_conversion(bgr_to_rgb) + +pre_quantization_optimization(activation_clipping, layers=[conv93], recollect_stats=True, mode=percentile_force, clipping_values=[0, 99.5]) +pre_quantization_optimization(activation_clipping, layers=[conv95], recollect_stats=True, mode=percentile_force, clipping_values=[0.15, 99.4]) +pre_quantization_optimization(activation_clipping, layers=[conv111], recollect_stats=True, mode=percentile_force, clipping_values=[0, 99.5]) +pre_quantization_optimization(activation_clipping, layers=[conv113], recollect_stats=True, mode=percentile_force, clipping_values=[0.15, 99.4]) +pre_quantization_optimization(activation_clipping, layers=[conv128], recollect_stats=True, mode=percentile_force, clipping_values=[0, 99.5]) +pre_quantization_optimization(activation_clipping, layers=[conv130], recollect_stats=True, mode=percentile_force, clipping_values=[0.15, 99.5]) + +pre_quantization_optimization(weights_clipping, layers=[conv93], mode=manual, clipping_values=[-1.80, 1.80]) +pre_quantization_optimization(weights_clipping, layers=[conv111], mode=manual, clipping_values=[-3.38, 3.38]) + +post_quantization_optimization(finetune, policy=disabled) + +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolox_l_leaky/pretrained/2023-05-31/nms_config_yolox_l_leaky.json", yolox, engine=cpu) diff --git a/hailo_model_zoo/cfg/alls/generic/yolox_s_leaky.alls b/hailo_model_zoo/cfg/alls/generic/yolox_s_leaky.alls new file mode 100644 index 00000000..72cd7030 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolox_s_leaky.alls @@ -0,0 +1,3 @@ +input_conversion = input_conversion(bgr_to_rgb) +post_quantization_optimization(finetune, policy=disabled) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_leaky/pretrained/2023-05-31/nms_config_yolox_s_leaky.json", yolox, engine=cpu) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/yolox_s_wide_leaky.alls b/hailo_model_zoo/cfg/alls/generic/yolox_s_wide_leaky.alls new file mode 100644 index 00000000..751802f7 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolox_s_wide_leaky.alls @@ -0,0 +1,3 @@ +# post_quantization_optimization commands +post_quantization_optimization(finetune, policy=disabled) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_wide_leaky/pretrained/2023-05-31/nms_config_yolox_s_wide_leaky.json", yolox, engine=cpu) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/yolox_tiny.alls b/hailo_model_zoo/cfg/alls/generic/yolox_tiny.alls new file mode 100644 index 00000000..bfe56992 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/yolox_tiny.alls @@ -0,0 +1,2 @@ +normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolox/yolox_tiny/pretrained/2023-05-31/nms_config_yolox_tiny.json", yolox, engine=cpu) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/generic/zero_dce.alls b/hailo_model_zoo/cfg/alls/generic/zero_dce.alls new file mode 100644 index 00000000..0946cc84 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/generic/zero_dce.alls @@ -0,0 +1,5 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +model_optimization_flavor(optimization_level=0, compression_level=0) + +allocator_param(enable_partial_row_buffers=disabled) +resources_param(max_compute_utilization=0.5, max_control_utilization=0.5, max_memory_utilization=0.5) diff --git a/hailo_model_zoo/cfg/alls/base/arcface_r50.alls b/hailo_model_zoo/cfg/alls/hailo8/base/arcface_r50.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/arcface_r50.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/arcface_r50.alls diff --git a/hailo_model_zoo/cfg/alls/performance/lprnet_yuy2.alls b/hailo_model_zoo/cfg/alls/hailo8/base/lprnet_yuy2.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/lprnet_yuy2.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/lprnet_yuy2.alls diff --git a/hailo_model_zoo/cfg/alls/hailo8/base/nanodet_repvgg.alls b/hailo_model_zoo/cfg/alls/hailo8/base/nanodet_repvgg.alls new file mode 100644 index 00000000..f4c47c06 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/base/nanodet_repvgg.alls @@ -0,0 +1,5 @@ +normalization1 = normalization([103.53, 116.28, 123.675], [57.375, 57.12, 58.395]) +model_optimization_config(calibration, batch_size=4, calibset_size=64) +input_conversion = input_conversion(bgr_to_rgb) + +allocator_param(merge_min_layer_utilization=0.1) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/nanodet_repvgg_a1_640.alls b/hailo_model_zoo/cfg/alls/hailo8/base/nanodet_repvgg_a1_640.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/nanodet_repvgg_a1_640.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/nanodet_repvgg_a1_640.alls diff --git a/hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1.alls b/hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1.alls new file mode 100644 index 00000000..20c90924 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1.alls @@ -0,0 +1,7 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json", ssd, engine=nn_core) +quantization_param({conv*}, bias_mode=single_scale_decomposition) +post_quantization_optimization(finetune, policy=enabled, dataset_size=4000, epochs=8, learning_rate=0.0001, + loss_layer_names=[bbox_decoder13, conv14, bbox_decoder17, conv18, bbox_decoder21, conv22, bbox_decoder25, conv26, bbox_decoder29, conv30, bbox_decoder33, conv34, conv32, conv24, conv28, conv12, conv20, conv16], + loss_factors=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], + loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2]) diff --git a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_no_alls.alls b/hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1_no_alls.alls similarity index 85% rename from hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_no_alls.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1_no_alls.alls index d3ba6ffc..f7045b04 100644 --- a/hailo_model_zoo/cfg/alls/base/ssd_mobilenet_v1_no_alls.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1_no_alls.alls @@ -1,4 +1,4 @@ normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) -nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json", ssd) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json", ssd, engine=nn_core) context_switch_param(mode=disabled) -post_quantization_optimization(finetune, policy=enabled, loss_factors=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], dataset_size=4000, epochs=8, learning_rate=0.0001, loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2], loss_layer_names=[bbox_decoder13, conv14, bbox_decoder17, conv18, bbox_decoder21, conv22, bbox_decoder25, conv26, bbox_decoder29, conv30, bbox_decoder33, conv34, conv32, conv24, conv28, conv12, conv20, conv16]) +post_quantization_optimization(finetune, policy=enabled, loss_factors=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], dataset_size=4000, epochs=4, learning_rate=0.0001, loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2], loss_layer_names=[bbox_decoder13, conv14, bbox_decoder17, conv18, bbox_decoder21, conv22, bbox_decoder25, conv26, bbox_decoder29, conv30, bbox_decoder33, conv34, conv32, conv24, conv28, conv12, conv20, conv16]) diff --git a/hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1_visdrone.alls b/hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1_visdrone.alls new file mode 100644 index 00000000..5a1e4b83 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/base/ssd_mobilenet_v1_visdrone.alls @@ -0,0 +1,6 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2023-06-07/mobilenet_ssd_nms_visdrone_postprocess_config.json", ssd, engine=nn_core) +model_optimization_config(calibration, batch_size=8, calibset_size=32) +quantization_param({conv*}, bias_mode=single_scale_decomposition) +post_quantization_optimization(finetune, policy=disabled) +post_quantization_optimization(bias_correction, policy=enabled) diff --git a/hailo_model_zoo/cfg/alls/base/stdc1.alls b/hailo_model_zoo/cfg/alls/hailo8/base/stdc1.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/base/stdc1.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/stdc1.alls diff --git a/hailo_model_zoo/cfg/alls/base/vit_base.alls b/hailo_model_zoo/cfg/alls/hailo8/base/vit_base.alls similarity index 93% rename from hailo_model_zoo/cfg/alls/base/vit_base.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/vit_base.alls index 0aa5f6d2..4d3c7435 100644 --- a/hailo_model_zoo/cfg/alls/base/vit_base.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/base/vit_base.alls @@ -1,10 +1,13 @@ +normalization0 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) + allocator_param(disable_row_per_cut=True) conv49_d0, conv49_d1, conv49_d2, conv49_d3, conv49_dc = defuse(conv49, 4) # model_optimization_config commands model_optimization_config(calibration, batch_size=16, calibset_size=64) -post_quantization_optimization(finetune, policy=disabled) -pre_quantization_optimization(equalization, policy=disabled) +post_quantization_optimization(finetune, policy=enabled, batch_size=4) +pre_quantization_optimization(equalization, policy=enabled) +model_optimization_flavor(optimization_level=2, compression_level=0) pre_quantization_optimization(activation_clipping, layers=[conv49], mode=percentile, clipping_values=[0.01, 99.9]) pre_quantization_optimization(activation_clipping, layers=[conv47], mode=percentile, clipping_values=[0.01, 99.5]) diff --git a/hailo_model_zoo/cfg/alls/hailo8/base/vit_small.alls b/hailo_model_zoo/cfg/alls/hailo8/base/vit_small.alls new file mode 100644 index 00000000..9a26fba9 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/base/vit_small.alls @@ -0,0 +1,19 @@ +normalization0 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) + +context_switch_param(mode=enabled) +allocator_param(enable_partial_row_buffers=disabled) +reshape1 = format_conversion(ew_add1, conv_slice1, conv_slice2, conv_slice3, conv3, reshape_1xw0_to_hxw) +allocator_param(automatic_reshapes=disabled) +buffers(space_to_depth1, conv1, 0, PARTIAL_ROW) +resources_param(strategy=greedy, max_compute_utilization=0.7, max_control_utilization=0.7, max_memory_utilization=0.7) + + +# model_optimization_config commands +model_optimization_config(calibration, batch_size=16, calibset_size=64) +post_quantization_optimization(finetune, policy=enabled, batch_size=4) +pre_quantization_optimization(equalization, policy=enabled) +model_optimization_flavor(optimization_level=2, compression_level=0) + +context_0 = context([input_layer1]) +context_1 = context([conv_slice13, conv_slice14, conv_slice15]) +context_2 = context([conv_slice25, conv_slice26, conv_slice27]) diff --git a/hailo_model_zoo/cfg/alls/base/vit_tiny.alls b/hailo_model_zoo/cfg/alls/hailo8/base/vit_tiny.alls similarity index 71% rename from hailo_model_zoo/cfg/alls/base/vit_tiny.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/vit_tiny.alls index 1d959e06..9a26fba9 100644 --- a/hailo_model_zoo/cfg/alls/base/vit_tiny.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/base/vit_tiny.alls @@ -1,3 +1,5 @@ +normalization0 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) + context_switch_param(mode=enabled) allocator_param(enable_partial_row_buffers=disabled) reshape1 = format_conversion(ew_add1, conv_slice1, conv_slice2, conv_slice3, conv3, reshape_1xw0_to_hxw) @@ -8,8 +10,9 @@ resources_param(strategy=greedy, max_compute_utilization=0.7, max_control_utiliz # model_optimization_config commands model_optimization_config(calibration, batch_size=16, calibset_size=64) -post_quantization_optimization(finetune, policy=disabled) -pre_quantization_optimization(equalization, policy=disabled) +post_quantization_optimization(finetune, policy=enabled, batch_size=4) +pre_quantization_optimization(equalization, policy=enabled) +model_optimization_flavor(optimization_level=2, compression_level=0) context_0 = context([input_layer1]) context_1 = context([conv_slice13, conv_slice14, conv_slice15]) diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m.alls b/hailo_model_zoo/cfg/alls/hailo8/base/yolov5m.alls similarity index 79% rename from hailo_model_zoo/cfg/alls/base/yolov5m.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/yolov5m.alls index 50e18c66..f0c9eee1 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5m.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/base/yolov5m.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) quantization_param(conv45, precision_mode=a8_w4) quantization_param(conv46, precision_mode=a8_w4) @@ -8,8 +9,4 @@ quantization_param(conv53, precision_mode=a8_w4) quantization_param(conv84, precision_mode=a8_w4) quantization_param(conv89, precision_mode=a8_w4) quantization_param(conv91, precision_mode=a8_w4) - -# post_quantization_optimization commands -post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) -allocator_param(merge_min_layer_utilization=0.1) -performance_param(fps=150) \ No newline at end of file +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp_yuy2.alls b/hailo_model_zoo/cfg/alls/hailo8/base/yolov5m_wo_spp_yuy2.alls similarity index 88% rename from hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp_yuy2.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/yolov5m_wo_spp_yuy2.alls index 3c0be92c..97d7b975 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5m_wo_spp_yuy2.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/base/yolov5m_wo_spp_yuy2.alls @@ -3,6 +3,7 @@ change_output_activation(sigmoid) yuv_to_rgb1 = yuv_to_rgb(input_layer1) resize_input1 = resize_input([720, 1280], input_layer1) reshape_yuy2 = input_conversion(input_layer1, yuy2_to_hailo_yuv, emulator_support=True) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) quantization_param(conv45, precision_mode=a8_w4) diff --git a/hailo_model_zoo/cfg/alls/hailo8/base/yolov5s_personface_nv12.alls b/hailo_model_zoo/cfg/alls/hailo8/base/yolov5s_personface_nv12.alls new file mode 100644 index 00000000..2d0680ff --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/base/yolov5s_personface_nv12.alls @@ -0,0 +1,9 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv70, conv63, conv55]) +yuv_to_rgb1 = input_conversion(yuv_to_rgb) +reshape, resize, concat = input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support = True) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.json", yolov5, engine=cpu) +allocator_param(timeout=1000, cluster_timeout=1000, automatic_ddr=disabled) +context_switch_param(mode=disabled) +performance_param(fps=320) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/base/yolov5xs_wo_spp_nms.alls b/hailo_model_zoo/cfg/alls/hailo8/base/yolov5xs_wo_spp_nms_core.alls similarity index 93% rename from hailo_model_zoo/cfg/alls/base/yolov5xs_wo_spp_nms.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/yolov5xs_wo_spp_nms_core.alls index 80c7ff62..bdce2470 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov5xs_wo_spp_nms.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/base/yolov5xs_wo_spp_nms_core.alls @@ -3,5 +3,4 @@ change_output_activation(sigmoid) nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2022-05-10/yolov5xs_wo_spp_nms_config.json", yolov5) model_optimization_config(calibration, batch_size=2, calibset_size=64) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv69, conv61, conv53]) -context_switch_param(mode=disabled) performance_param(fps=100) diff --git a/hailo_model_zoo/cfg/alls/base/yolov6n.alls b/hailo_model_zoo/cfg/alls/hailo8/base/yolov6n.alls similarity index 75% rename from hailo_model_zoo/cfg/alls/base/yolov6n.alls rename to hailo_model_zoo/cfg/alls/hailo8/base/yolov6n.alls index 310775ff..74209570 100644 --- a/hailo_model_zoo/cfg/alls/base/yolov6n.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/base/yolov6n.alls @@ -2,5 +2,4 @@ model_optimization_config(calibration, batch_size=2, calibset_size=64) post_quantization_optimization(finetune, policy=enabled, loss_factors=[0.125, 2, 0.25, 0.125, 2, 0.25, 0.125, 2, 0.25, 1, 1, 1], dataset_size=4000, epochs=8, learning_rate=1e-5, loss_layer_names=[conv36, conv37, conv38, conv47, conv48, conv49, conv57, conv58, conv59, conv33, conv43, conv54], loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2, l2rel, l2rel, l2rel]) context_switch_param(mode=disabled) -resources_param(max_compute_utilization=1.0, max_control_utilization=1.1, max_memory_utilization=1.0) -allocator_param(merge_min_layer_utilization=0.1) +performance_param(optimization_level=max) diff --git a/hailo_model_zoo/cfg/alls/performance/centerpose_regnetx_1.6gf_fpn.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/centerpose_regnetx_1.6gf_fpn.alls similarity index 88% rename from hailo_model_zoo/cfg/alls/performance/centerpose_regnetx_1.6gf_fpn.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/centerpose_regnetx_1.6gf_fpn.alls index 7bbb4314..350cf179 100644 --- a/hailo_model_zoo/cfg/alls/performance/centerpose_regnetx_1.6gf_fpn.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/centerpose_regnetx_1.6gf_fpn.alls @@ -2,7 +2,6 @@ centerpose_regnetx_1_6gf_fpn/normalization1 = normalization([119.85, 113.985, 10 model_optimization_config(calibration, batch_size=4, calibset_size=32) # pre_quantization_optimization commands pre_quantization_optimization(equalization, policy=disabled) -quantization_param({*output_layer*}, precision_mode=a8_w8) performance_param(fps=130) change_output_activation(centerpose_regnetx_1_6gf_fpn/conv79, sigmoid) -change_output_activation(centerpose_regnetx_1_6gf_fpn/conv75, sigmoid) \ No newline at end of file +change_output_activation(centerpose_regnetx_1_6gf_fpn/conv75, sigmoid) diff --git a/hailo_model_zoo/cfg/alls/performance/centerpose_repvgg_a0.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/centerpose_repvgg_a0.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/centerpose_repvgg_a0.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/centerpose_repvgg_a0.alls diff --git a/hailo_model_zoo/cfg/alls/performance/efficientnet_m.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/efficientnet_m.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/efficientnet_m.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/efficientnet_m.alls diff --git a/hailo_model_zoo/cfg/alls/performance/lightface_slim.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/lightface_slim.alls similarity index 80% rename from hailo_model_zoo/cfg/alls/performance/lightface_slim.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/lightface_slim.alls index e120a8b7..97209811 100644 --- a/hailo_model_zoo/cfg/alls/performance/lightface_slim.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/lightface_slim.alls @@ -2,4 +2,3 @@ normalization1 = normalization([127.0, 127.0, 127.0], [128.0, 128.0, 128.0]) model_optimization_config(calibration, batch_size=8, calibset_size=16) post_quantization_optimization(finetune, policy=disabled) allocator_param(automatic_ddr=disabled) -quantization_param({output_layer*}, precision_mode=a8_w8) diff --git a/hailo_model_zoo/cfg/alls/performance/regnetx_800mf.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/regnetx_800mf.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/regnetx_800mf.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/regnetx_800mf.alls diff --git a/hailo_model_zoo/cfg/alls/performance/resnet_v1_50.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/resnet_v1_50.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/resnet_v1_50.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/resnet_v1_50.alls diff --git a/hailo_model_zoo/cfg/alls/hailo8/performance/ssd_mobilenet_v1.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/ssd_mobilenet_v1.alls new file mode 100644 index 00000000..e16a5380 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/ssd_mobilenet_v1.alls @@ -0,0 +1,13 @@ +normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json", ssd, engine=nn_core) + +quantization_param({conv*}, bias_mode=single_scale_decomposition) +post_quantization_optimization(finetune, policy=enabled, dataset_size=4000, epochs=8, learning_rate=0.0001, + loss_layer_names=[bbox_decoder13, conv14, bbox_decoder17, conv18, bbox_decoder21, conv22, bbox_decoder25, conv26, bbox_decoder29, conv30, bbox_decoder33, conv34, conv32, conv24, conv28, conv12, conv20, conv16], + loss_factors=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], + loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2]) + + +nms1_d0, nms1_d0_output, nms1_d1, nms1_d1_output = defuse(nms1, 2, defuse_type=NMS) +performance_param(compiler_optimization_level=max) +allocator_param(enable_lanes=False) diff --git a/hailo_model_zoo/cfg/alls/performance/ssd_mobilenet_v1_visdrone.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/ssd_mobilenet_v1_visdrone.alls similarity index 77% rename from hailo_model_zoo/cfg/alls/performance/ssd_mobilenet_v1_visdrone.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/ssd_mobilenet_v1_visdrone.alls index 4da35933..21b3b7ad 100644 --- a/hailo_model_zoo/cfg/alls/performance/ssd_mobilenet_v1_visdrone.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/ssd_mobilenet_v1_visdrone.alls @@ -1,6 +1,5 @@ normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) -nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2021-07-11/mobilenet_ssd_nms_visdrone_postprocess_config.json", ssd) -context_switch_param(mode=disabled) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2023-06-07/mobilenet_ssd_nms_visdrone_postprocess_config.json", ssd, engine=nn_core) model_optimization_config(calibration, batch_size=8, calibset_size=32) ## Allocator Script Version 1.0 quantization_param({conv*}, bias_mode=single_scale_decomposition) diff --git a/hailo_model_zoo/cfg/alls/hailo8/performance/stdc1.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/stdc1.alls new file mode 100644 index 00000000..6f8c7747 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/stdc1.alls @@ -0,0 +1,7 @@ +stdc1/normalization1 = normalization([123.675, 116.28, 103.53], [58.395, 57.12, 57.375]) +model_optimization_config(calibration, batch_size=1, calibset_size=64) +post_quantization_optimization(finetune, policy=enabled, dataset_size=512, epochs=6, loss_layer_names=[conv33], loss_types=[l2]) + +resize7_d0, resize7_d1, resize7_d2, resize7_dc = defuse(resize7, 3) +performance_param(compiler_optimization_level=1) +allocator_param(timeout=25m) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/performance/tiny_yolov4_license_plates_yuy2.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/tiny_yolov4_license_plates_yuy2.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/tiny_yolov4_license_plates_yuy2.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/tiny_yolov4_license_plates_yuy2.alls diff --git a/hailo_model_zoo/cfg/alls/performance/yolov3_gluon.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov3_gluon.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/yolov3_gluon.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov3_gluon.alls diff --git a/hailo_model_zoo/cfg/alls/performance/yolov3_gluon_416.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov3_gluon_416.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/yolov3_gluon_416.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov3_gluon_416.alls diff --git a/hailo_model_zoo/cfg/alls/performance/yolov4_leaky.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov4_leaky.alls similarity index 100% rename from hailo_model_zoo/cfg/alls/performance/yolov4_leaky.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov4_leaky.alls diff --git a/hailo_model_zoo/cfg/alls/performance/yolov5m_hpp.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m.alls similarity index 93% rename from hailo_model_zoo/cfg/alls/performance/yolov5m_hpp.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m.alls index efbb078e..41e98f4d 100644 --- a/hailo_model_zoo/cfg/alls/performance/yolov5m_hpp.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m.alls @@ -1,6 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) -nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2022-01-02/yolov5m_nms_config.json", yolov5, engine=cpu) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) quantization_param(conv45, precision_mode=a8_w4) quantization_param(conv46, precision_mode=a8_w4) diff --git a/hailo_model_zoo/cfg/alls/performance/yolov5m_vehicles.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles.alls similarity index 59% rename from hailo_model_zoo/cfg/alls/performance/yolov5m_vehicles.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles.alls index b3dac3ef..a82ff651 100644 --- a/hailo_model_zoo/cfg/alls/performance/yolov5m_vehicles.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles.alls @@ -9,8 +9,10 @@ quantization_param(conv53, precision_mode=a8_w4) quantization_param(conv84, precision_mode=a8_w4) quantization_param(conv89, precision_mode=a8_w4) quantization_param(conv91, precision_mode=a8_w4) -quantization_param({output_layer*}, precision_mode=a8_w8) -post_quantization_optimization(finetune, policy=enabled, use_acceleras=disabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) +pre_quantization_optimization(weights_clipping, layers=[conv75], mode=manual, clipping_values=[-32.52, 32.52]) +pre_quantization_optimization(weights_clipping, layers=[conv85], mode=manual, clipping_values=[-26.61, 26.61]) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json", yolov5, engine=cpu) allocator_param(timeout=100000, cluster_timeout=100000, automatic_ddr=disabled) allocator_param(merge_min_layer_utilization=0.1) diff --git a/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles_nv12.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles_nv12.alls new file mode 100644 index 00000000..abc0550a --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles_nv12.alls @@ -0,0 +1,21 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +resize_input1 = resize_input([1080, 1920], input_layer1) +model_optimization_config(calibration, batch_size=4, calibset_size=64) +quantization_param(conv45, precision_mode=a8_w4) +quantization_param(conv46, precision_mode=a8_w4) +quantization_param(conv51, precision_mode=a8_w4) +quantization_param(conv53, precision_mode=a8_w4) +quantization_param(conv84, precision_mode=a8_w4) +quantization_param(conv89, precision_mode=a8_w4) +quantization_param(conv91, precision_mode=a8_w4) +pre_quantization_optimization(weights_clipping, layers=[conv75], mode=manual, clipping_values=[-32.52, 32.52]) +pre_quantization_optimization(weights_clipping, layers=[conv85], mode=manual, clipping_values=[-26.61, 26.61]) +post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) +yuv_to_rgb1 = yuv_to_rgb() +reshape , resize, concat= input_conversion(input_layer1, nv12_to_hailo_yuv, emulator_support=True) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json", yolov5, engine=cpu) + +compilation_param(yolov5m_vehicles_nv12/resize_input1, resize_bilinear_streaming=enabled) +allocator_param(automatic_reshapes=False) +performance_param(fps=80) diff --git a/hailo_model_zoo/cfg/alls/performance/yolov5m_vehicles_yuy2.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles_yuy2.alls similarity index 76% rename from hailo_model_zoo/cfg/alls/performance/yolov5m_vehicles_yuy2.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles_yuy2.alls index 59556926..3056618a 100644 --- a/hailo_model_zoo/cfg/alls/performance/yolov5m_vehicles_yuy2.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_vehicles_yuy2.alls @@ -9,11 +9,13 @@ quantization_param(conv53, precision_mode=a8_w4) quantization_param(conv84, precision_mode=a8_w4) quantization_param(conv89, precision_mode=a8_w4) quantization_param(conv91, precision_mode=a8_w4) -quantization_param({output_layer*}, precision_mode=a8_w8) +pre_quantization_optimization(weights_clipping, layers=[conv75], mode=manual, clipping_values=[-32.52, 32.52]) +pre_quantization_optimization(weights_clipping, layers=[conv85], mode=manual, clipping_values=[-26.61, 26.61]) post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv94, conv85, conv75]) yuv_to_rgb1 = yuv_to_rgb() reshape_yuy2 = input_conversion(input_layer1, yuy2_to_hailo_yuv, emulator_support=True) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json", yolov5, engine=cpu) allocator_param(timeout=100000, cluster_timeout=100000, automatic_ddr=disabled) allocator_param(merge_min_layer_utilization=0.1) diff --git a/hailo_model_zoo/cfg/alls/performance/yolov5m_wo_spp.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_wo_spp.alls similarity index 87% rename from hailo_model_zoo/cfg/alls/performance/yolov5m_wo_spp.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_wo_spp.alls index 63e56c8f..eb7cfc45 100644 --- a/hailo_model_zoo/cfg/alls/performance/yolov5m_wo_spp.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_wo_spp.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) quantization_param(conv45, precision_mode=a8_w4) quantization_param(conv46, precision_mode=a8_w4) diff --git a/hailo_model_zoo/cfg/alls/performance/yolov5m_wo_spp_60p.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_wo_spp_60p.alls similarity index 99% rename from hailo_model_zoo/cfg/alls/performance/yolov5m_wo_spp_60p.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_wo_spp_60p.alls index 09994ac7..5600d803 100644 --- a/hailo_model_zoo/cfg/alls/performance/yolov5m_wo_spp_60p.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5m_wo_spp_60p.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_nms_config.json", yolov5, engine=cpu) model_optimization_config(calibration, batch_size=4, calibset_size=64) # New quantization params post_quantization_optimization(bias_correction, policy=disabled) @@ -333,7 +334,6 @@ buffers(yolov5m_wo_spp_60p/merged_layer_conv70_conv71, yolov5m_wo_spp_60p/merged buffers(yolov5m_wo_spp_60p/merged_layer_concat8_batch_norm6, yolov5m_wo_spp_60p/conv72, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/conv72, yolov5m_wo_spp_60p/conv74, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/conv72, yolov5m_wo_spp_60p/conv73, 2, FULL_ROW) -buffers(yolov5m_wo_spp_60p/conv74, yolov5m_wo_spp_60p/output_layer1, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/conv73, yolov5m_wo_spp_60p/concat9, 2, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/concat9, yolov5m_wo_spp_60p/conv76, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/concat9, yolov5m_wo_spp_60p/merged_layer_conv75_conv77, 2, FULL_ROW) @@ -346,7 +346,6 @@ buffers(yolov5m_wo_spp_60p/conv81, yolov5m_wo_spp_60p/merged_layer_concat10_batc buffers(yolov5m_wo_spp_60p/merged_layer_concat10_batch_norm7, yolov5m_wo_spp_60p/conv82, 2, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/conv82, yolov5m_wo_spp_60p/conv84, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/conv82, yolov5m_wo_spp_60p/conv83, 3, FULL_ROW) -buffers(yolov5m_wo_spp_60p/conv84, yolov5m_wo_spp_60p/output_layer2, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/conv83, yolov5m_wo_spp_60p/concat11, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/concat11, yolov5m_wo_spp_60p/conv85, 2, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/concat11, yolov5m_wo_spp_60p/conv86, 2, 2, FULL_ROW) @@ -359,7 +358,6 @@ buffers(yolov5m_wo_spp_60p/conv90, yolov5m_wo_spp_60p/conv91, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/conv91, yolov5m_wo_spp_60p/merged_layer_concat12_batch_norm8, 2, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/merged_layer_concat12_batch_norm8, yolov5m_wo_spp_60p/conv92, 2, 2, FULL_ROW) buffers(yolov5m_wo_spp_60p/conv92, yolov5m_wo_spp_60p/conv93, 2, FULL_ROW) -buffers(yolov5m_wo_spp_60p/conv93, yolov5m_wo_spp_60p/output_layer3, 2, FULL_ROW) context_0 = context([yolov5m_wo_spp_60p/batch_norm1, yolov5m_wo_spp_60p/concat1, yolov5m_wo_spp_60p/concat11, yolov5m_wo_spp_60p/concat5, yolov5m_wo_spp_60p/concat7, yolov5m_wo_spp_60p/concat9, yolov5m_wo_spp_60p/conv10, yolov5m_wo_spp_60p/conv11_d0, yolov5m_wo_spp_60p/conv11_d1, yolov5m_wo_spp_60p/conv11_dc, yolov5m_wo_spp_60p/conv12, yolov5m_wo_spp_60p/conv13, yolov5m_wo_spp_60p/conv1_d0, yolov5m_wo_spp_60p/conv1_d1, yolov5m_wo_spp_60p/conv1_dc, yolov5m_wo_spp_60p/conv26, yolov5m_wo_spp_60p/conv27, yolov5m_wo_spp_60p/conv28_d0, yolov5m_wo_spp_60p/conv28_d1, yolov5m_wo_spp_60p/conv28_dc, yolov5m_wo_spp_60p/conv29, yolov5m_wo_spp_60p/conv2_sd0, yolov5m_wo_spp_60p/conv2_sd1, yolov5m_wo_spp_60p/conv2_sd2, yolov5m_wo_spp_60p/conv2_sdc, yolov5m_wo_spp_60p/conv3, yolov5m_wo_spp_60p/conv30, yolov5m_wo_spp_60p/conv31, yolov5m_wo_spp_60p/conv32, yolov5m_wo_spp_60p/conv33, yolov5m_wo_spp_60p/conv34, yolov5m_wo_spp_60p/conv35, yolov5m_wo_spp_60p/conv36, yolov5m_wo_spp_60p/conv37, yolov5m_wo_spp_60p/conv38, yolov5m_wo_spp_60p/conv39, yolov5m_wo_spp_60p/conv4, yolov5m_wo_spp_60p/conv40, yolov5m_wo_spp_60p/conv41, yolov5m_wo_spp_60p/conv42, yolov5m_wo_spp_60p/conv43, yolov5m_wo_spp_60p/conv44, yolov5m_wo_spp_60p/conv45_d0, yolov5m_wo_spp_60p/conv45_d1, yolov5m_wo_spp_60p/conv45_dc, yolov5m_wo_spp_60p/conv46_d0, yolov5m_wo_spp_60p/conv46_d1, yolov5m_wo_spp_60p/conv46_dc, yolov5m_wo_spp_60p/conv48, yolov5m_wo_spp_60p/conv5, yolov5m_wo_spp_60p/conv50, yolov5m_wo_spp_60p/conv51, yolov5m_wo_spp_60p/conv52, yolov5m_wo_spp_60p/conv53, yolov5m_wo_spp_60p/conv54, yolov5m_wo_spp_60p/conv55, yolov5m_wo_spp_60p/conv57, yolov5m_wo_spp_60p/conv59, yolov5m_wo_spp_60p/conv6, yolov5m_wo_spp_60p/conv60, yolov5m_wo_spp_60p/conv61, yolov5m_wo_spp_60p/conv62, yolov5m_wo_spp_60p/conv63, yolov5m_wo_spp_60p/conv64, yolov5m_wo_spp_60p/conv66, yolov5m_wo_spp_60p/conv7, yolov5m_wo_spp_60p/conv72, yolov5m_wo_spp_60p/conv74, yolov5m_wo_spp_60p/conv73, yolov5m_wo_spp_60p/conv76, yolov5m_wo_spp_60p/conv78, yolov5m_wo_spp_60p/conv79, yolov5m_wo_spp_60p/conv8, yolov5m_wo_spp_60p/conv80, yolov5m_wo_spp_60p/conv81, yolov5m_wo_spp_60p/conv82, yolov5m_wo_spp_60p/conv84, yolov5m_wo_spp_60p/conv83, yolov5m_wo_spp_60p/conv85, yolov5m_wo_spp_60p/conv86, yolov5m_wo_spp_60p/conv87, yolov5m_wo_spp_60p/conv88, yolov5m_wo_spp_60p/conv89, yolov5m_wo_spp_60p/conv9, yolov5m_wo_spp_60p/conv90, yolov5m_wo_spp_60p/conv91, yolov5m_wo_spp_60p/conv92, yolov5m_wo_spp_60p/conv93, yolov5m_wo_spp_60p/ew_add1, yolov5m_wo_spp_60p/ew_add10, yolov5m_wo_spp_60p/ew_add11, yolov5m_wo_spp_60p/ew_add12, yolov5m_wo_spp_60p/ew_add13, yolov5m_wo_spp_60p/ew_add14, yolov5m_wo_spp_60p/ew_add2, yolov5m_wo_spp_60p/ew_add3, yolov5m_wo_spp_60p/ew_add4, yolov5m_wo_spp_60p/ew_add5, yolov5m_wo_spp_60p/ew_add6, yolov5m_wo_spp_60p/ew_add7, yolov5m_wo_spp_60p/ew_add8, yolov5m_wo_spp_60p/ew_add9, yolov5m_wo_spp_60p/merged_layer_concat10_batch_norm7, yolov5m_wo_spp_60p/merged_layer_concat12_batch_norm8, yolov5m_wo_spp_60p/merged_layer_concat2_batch_norm2, yolov5m_wo_spp_60p/merged_layer_concat3_batch_norm3, yolov5m_wo_spp_60p/merged_layer_concat4_batch_norm4, yolov5m_wo_spp_60p/merged_layer_concat6_batch_norm5, yolov5m_wo_spp_60p/merged_layer_concat8_batch_norm6, yolov5m_wo_spp_60p/merged_layer_conv14_conv15, yolov5m_wo_spp_60p/merged_layer_conv16_conv17, yolov5m_wo_spp_60p/merged_layer_conv18_conv19, yolov5m_wo_spp_60p/merged_layer_conv20_conv21, yolov5m_wo_spp_60p/merged_layer_conv22_conv23, yolov5m_wo_spp_60p/merged_layer_conv24_conv25, yolov5m_wo_spp_60p/merged_layer_conv47_conv49, yolov5m_wo_spp_60p/merged_layer_conv56_conv58, yolov5m_wo_spp_60p/merged_layer_conv65_conv67, yolov5m_wo_spp_60p/merged_layer_conv68_conv69, yolov5m_wo_spp_60p/merged_layer_conv70_conv71, yolov5m_wo_spp_60p/merged_layer_conv75_conv77, yolov5m_wo_spp_60p/normalization1, yolov5m_wo_spp_60p/portal0, yolov5m_wo_spp_60p/portal1, yolov5m_wo_spp_60p/portal2, yolov5m_wo_spp_60p/portal3, yolov5m_wo_spp_60p/portal4, yolov5m_wo_spp_60p/resize1, yolov5m_wo_spp_60p/resize2, yolov5m_wo_spp_60p/space_to_depth1]) diff --git a/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5s.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5s.alls new file mode 100644 index 00000000..f44c0b3f --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5s.alls @@ -0,0 +1,5 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_spp/pretrained/2023-04-25/yolov5s_nms_config.json", yolov5, engine=cpu) +model_optimization_config(calibration, batch_size=4) +performance_param(fps=375) diff --git a/hailo_model_zoo/cfg/alls/performance/yolov5s_personface.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5s_personface.alls similarity index 71% rename from hailo_model_zoo/cfg/alls/performance/yolov5s_personface.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolov5s_personface.alls index 0ff55edf..b99f3f62 100644 --- a/hailo_model_zoo/cfg/alls/performance/yolov5s_personface.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov5s_personface.alls @@ -1,5 +1,6 @@ normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) change_output_activation(sigmoid) +nms_postprocess("$HMZ_DATA/models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.json", yolov5, engine=cpu) # post_quantization_optimization commands post_quantization_optimization(finetune, policy=enabled, learning_rate=0.0001, epochs=4, dataset_size=4000, loss_factors=[1.0, 1.0, 1.0], loss_types=[l2rel, l2rel, l2rel], loss_layer_names=[conv70, conv63, conv55]) diff --git a/hailo_model_zoo/cfg/alls/hailo8/performance/yolov8n.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov8n.alls new file mode 100644 index 00000000..66ba5779 --- /dev/null +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolov8n.alls @@ -0,0 +1,5 @@ +normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) +change_output_activation(conv42, sigmoid) +change_output_activation(conv53, sigmoid) +change_output_activation(conv63, sigmoid) +performance_param(optimization_level=max) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/alls/performance/yolox_s_leaky.alls b/hailo_model_zoo/cfg/alls/hailo8/performance/yolox_s_leaky.alls similarity index 50% rename from hailo_model_zoo/cfg/alls/performance/yolox_s_leaky.alls rename to hailo_model_zoo/cfg/alls/hailo8/performance/yolox_s_leaky.alls index fefe863c..29ff712d 100644 --- a/hailo_model_zoo/cfg/alls/performance/yolox_s_leaky.alls +++ b/hailo_model_zoo/cfg/alls/hailo8/performance/yolox_s_leaky.alls @@ -2,3 +2,4 @@ allocator_param(timeout=1800) input_conversion = input_conversion(bgr_to_rgb) post_quantization_optimization(finetune, policy=disabled) performance_param(fps=250) +nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_leaky/pretrained/2023-05-31/nms_config_yolox_s_leaky.json", yolox, engine=cpu) diff --git a/hailo_model_zoo/cfg/alls/performance/lprnet.alls b/hailo_model_zoo/cfg/alls/performance/lprnet.alls deleted file mode 100644 index a8652eea..00000000 --- a/hailo_model_zoo/cfg/alls/performance/lprnet.alls +++ /dev/null @@ -1,3 +0,0 @@ -lprnet/normalization1 = normalization([127.5, 127.5, 127.5], [128.0, 128.0, 128.0]) -input_conversion = input_conversion(bgr_to_rgb) -performance_param(fps=330) diff --git a/hailo_model_zoo/cfg/alls/performance/ssd_mobilenet_v1.alls b/hailo_model_zoo/cfg/alls/performance/ssd_mobilenet_v1.alls deleted file mode 100644 index 2ebd77cd..00000000 --- a/hailo_model_zoo/cfg/alls/performance/ssd_mobilenet_v1.alls +++ /dev/null @@ -1,337 +0,0 @@ -normalization1 = normalization([127.5, 127.5, 127.5], [127.5, 127.5, 127.5]) -nms_postprocess("$HMZ_DATA/models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json", ssd) -context_switch_param(mode=disabled) -## Allocator Script Version 1.0 -### Auto generated allocation script ### - -quantization_param({conv*}, bias_mode=single_scale_decomposition) - -# post_quantization_optimization commands -post_quantization_optimization(finetune, policy=enabled, dataset_size=4000, epochs=8, learning_rate=0.0001, - loss_layer_names=[bbox_decoder13, conv14, bbox_decoder17, conv18, bbox_decoder21, conv22, bbox_decoder25, conv26, bbox_decoder29, conv30, bbox_decoder33, conv34, conv32, conv24, conv28, conv12, conv20, conv16], - loss_factors=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], - loss_types=[l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2, l2]) - -allocator_param(agent=melg, automatic_ddr=False, automatic_ddr_l3_cuts_threshold=25, builder_exit_point=post-compilation, clk_freq=400000000.0, cluster_timeout=300, defuse_by_validator=True, enable_axis_upsize=True, enable_fixer=True, enable_loose_mode=False, enable_macros=True, enable_swapper=True, max_auto_defuse=8, max_cluster_util=1.0, network_fps=1150.0, seed=74, strategy=blind_search, timeout=30000, validate=True, automatic_l4_portals=False, optimize_buffers=False) - -proposal_generator0_sd0, proposal_generator0_sd1, proposal_generator0_sd2, proposal_generator0_sdc = defuse(proposal_generator0, 3, defuse_type=SPATIAL) -proposal_generator1_sd0, proposal_generator1_sd1, proposal_generator1_sdc = defuse(proposal_generator1, 2, defuse_type=SPATIAL) -portal_proposal_generator0_concat_proposal_generator0_concat_concat = portal(proposal_generator0_concat, proposal_generator0_concat_concat) -dw1_d0, dw1_d1, dw1_d2, dw1_d3, dw1_dc = defuse(dw1, 4) -dw2_d0, dw2_d1, dw2_d2, dw2_dc = defuse(dw2, 3) -dw3_d0, dw3_d1, dw3_d2, dw3_d3, dw3_d4, dw3_dc = defuse(dw3, 5) -dw4_d0, dw4_d1, dw4_d2, dw4_dc = defuse(dw4, 3) -dw5_d0, dw5_d1, dw5_d2, dw5_dc = defuse(dw5, 3) -dw7_d0, dw7_d1, dw7_d2, dw7_dc = defuse(dw7, 3) -dw8_d0, dw8_d1, dw8_d2, dw8_dc = defuse(dw8, 3) -dw9_d0, dw9_d1, dw9_d2, dw9_dc = defuse(dw9, 3) -dw10_d0, dw10_d1, dw10_d2, dw10_dc = defuse(dw10, 3) -dw11_d0, dw11_d1, dw11_d2, dw11_dc = defuse(dw11, 3) -dw12_d0, dw12_d1, dw12_dc = defuse(dw12, 2) -dw13_d0, dw13_d1, dw13_dc = defuse(dw13, 2) -conv16_d0, conv16_d1, conv16_dc = defuse(conv16, 2) -shortcut_from_conv3_to_dw3_d0_dw3_d1_dw3_d2_dw3_d3 = shortcut(conv3, [dw3_d0, dw3_d1, dw3_d2, dw3_d3]) -concat_to_dw3_dc_from_dw3_d0_dw3_d1_dw3_d2_dw3_d3 = concat([dw3_d0, dw3_d1, dw3_d2, dw3_d3], dw3_dc) -shortcut_from_conv12_to_conv13_exp1_conv13_linear0_conv14_dw12_d0 = shortcut(conv12, [conv13_exp1, conv13_linear0, conv14, dw12_d0]) -nms1_d0, nms1_d0_output, nms1_d1, nms1_d1_output = defuse(nms1, 2, defuse_type=NMS) -compilation_param({*}, layer_output_buffers_format=consecutive) - -compilation_param(normalization1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=4, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw1_d3, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=4, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw1_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=4, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw1_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=4, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw1_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=4, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw1_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=4, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=8, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw2_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw2_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw2_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw2_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv3, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=4, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(shortcut_from_conv3_to_dw3_d0_dw3_d1_dw3_d2_dw3_d3, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, fps=0.0, mixed_mem=False, no_contexts=allowed, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw3_d3, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=5, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw3_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=5, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw3_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=5, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw3_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=5, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(concat_to_dw3_dc_from_dw3_d0_dw3_d1_dw3_d2_dw3_d3, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=5, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(dw3_d4, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=5, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw3_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=5, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv4, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=8, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw4_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw4_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw4_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw4_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv5, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=4, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw5_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw5_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw5_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw5_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv6, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw6, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv7, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=4, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw7_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw7_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw7_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw7_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv8, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw8_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw8_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw8_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw8_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv9, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw9_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw9_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw9_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw9_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv10, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw10_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw10_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw10_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw10_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv11, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw11_d2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw11_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw11_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw11_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=3, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv12, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=8, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(shortcut_from_conv12_to_conv13_exp1_conv13_linear0_conv14_dw12_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, fps=0.0, mixed_mem=False, no_contexts=allowed, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw12_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv14, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=5, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv13_linear0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv13_exp1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(bbox_decoder13, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator0_sd2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=True, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator0_sd1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=True, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator0_sd0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=True, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator0_sdc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=True, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(dw12_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw12_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv15, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(dw13_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw13_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=enabled) -compilation_param(dw13_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=enabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv16_d1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=5, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv16_d0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=5, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv16_dc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=2, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(conv19, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv20, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=5, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv23, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=6, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv24, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv27, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=3, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv28, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv31, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv32, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=6, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv34, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=5, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv33_linear0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv33_exp1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(bbox_decoder33, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator5, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv30, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=3, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv29_linear0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv29_exp1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(bbox_decoder29, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator4, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv26, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=3, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv25_linear0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv25_exp1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(bbox_decoder25, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator3, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator3_concat, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv22, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=7, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv21_linear0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv21_exp1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(bbox_decoder21, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator2, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv18, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=8, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv17_linear0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(conv17_exp1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=2, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(bbox_decoder17, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator1_sd1, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=True, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator1_sd0, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=True, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator1_sdc, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=True, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=disabled) -compilation_param(proposal_generator0_concat, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(portal_proposal_generator0_concat_proposal_generator0_concat_concat, balance_output_multisplit=False, buffer_in_l4=True, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=False, no_contexts=allowed, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=0, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) -compilation_param(proposal_generator0_concat_concat, balance_output_multisplit=True, buffer_in_l4=False, defuse_num_layers=1, defuse_spatial_w=False, mixed_mem=True, no_contexts=disabled, number_of_apus=1, number_of_input_aligners=1, number_of_subclusters=1, resize_bilinear_streaming=disabled, resources_allocation_strategy=manual_scs_selection, use_16x4_sc=allowed) - - -compilation_param(proposal_generator0_concat_concat, layer_output_buffers_format=row_per_cut) - -buffers(normalization1, conv1, 2) -buffers(conv1, dw1_d0, 4) -buffers(conv1, dw1_d1, 4) -buffers(conv1, dw1_d2, 4) -buffers(conv1, dw1_d3, 4, 4) -buffers(dw1_d3, dw1_dc, 2, 2) -buffers(dw1_d2, dw1_dc, 2) -buffers(dw1_d1, dw1_dc, 2) -buffers(dw1_d0, dw1_dc, 2) -buffers(dw1_dc, conv2, 2, 2) -buffers(conv2, dw2_d0, 5) -buffers(conv2, dw2_d1, 5) -buffers(conv2, dw2_d2, 5) -buffers(dw2_d2, dw2_dc, 2) -buffers(dw2_d1, dw2_dc, 2) -buffers(dw2_d0, dw2_dc, 2) -buffers(dw2_dc, conv3, 2) -buffers(conv3, shortcut_from_conv3_to_dw3_d0_dw3_d1_dw3_d2_dw3_d3, 4) -buffers(conv3, dw3_d4, 4, 4) -buffers(dw3_d4, dw3_dc, 2) -buffers(shortcut_from_conv3_to_dw3_d0_dw3_d1_dw3_d2_dw3_d3, dw3_d0, 4) -buffers(shortcut_from_conv3_to_dw3_d0_dw3_d1_dw3_d2_dw3_d3, dw3_d1, 4) -buffers(shortcut_from_conv3_to_dw3_d0_dw3_d1_dw3_d2_dw3_d3, dw3_d2, 4) -buffers(shortcut_from_conv3_to_dw3_d0_dw3_d1_dw3_d2_dw3_d3, dw3_d3, 4) -buffers(dw3_d3, concat_to_dw3_dc_from_dw3_d0_dw3_d1_dw3_d2_dw3_d3, 2) -buffers(dw3_d2, concat_to_dw3_dc_from_dw3_d0_dw3_d1_dw3_d2_dw3_d3, 2) -buffers(dw3_d1, concat_to_dw3_dc_from_dw3_d0_dw3_d1_dw3_d2_dw3_d3, 2) -buffers(dw3_d0, concat_to_dw3_dc_from_dw3_d0_dw3_d1_dw3_d2_dw3_d3, 2) -buffers(concat_to_dw3_dc_from_dw3_d0_dw3_d1_dw3_d2_dw3_d3, dw3_dc, 2, 2) -buffers(dw3_dc, conv4, 2, 2) -buffers(conv4, dw4_d0, 5) -buffers(conv4, dw4_d1, 5) -buffers(conv4, dw4_d2, 5) -buffers(dw4_d2, dw4_dc, 2) -buffers(dw4_d1, dw4_dc, 2) -buffers(dw4_d0, dw4_dc, 2) -buffers(dw4_dc, conv5, 2, 2) -buffers(conv5, dw5_d0, 4) -buffers(conv5, dw5_d1, 4) -buffers(conv5, dw5_d2, 4) -buffers(dw5_d2, dw5_dc, 2) -buffers(dw5_d1, dw5_dc, 2) -buffers(dw5_d0, dw5_dc, 2) -buffers(dw5_dc, conv6, 2) -buffers(conv6, dw6, 5, 5) -buffers(dw6, conv7, 2) -buffers(conv7, dw7_d0, 4) -buffers(conv7, dw7_d1, 4) -buffers(conv7, dw7_d2, 4) -buffers(dw7_d2, dw7_dc, 2) -buffers(dw7_d1, dw7_dc, 2) -buffers(dw7_d0, dw7_dc, 2) -buffers(dw7_dc, conv8, 2) -buffers(conv8, dw8_d0, 4) -buffers(conv8, dw8_d1, 4, 4) -buffers(conv8, dw8_d2, 4, 4) -buffers(dw8_d2, dw8_dc, 2) -buffers(dw8_d1, dw8_dc, 2, 2) -buffers(dw8_d0, dw8_dc, 2, 2) -buffers(dw8_dc, conv9, 2, 2) -buffers(conv9, dw9_d0, 4) -buffers(conv9, dw9_d1, 4) -buffers(conv9, dw9_d2, 4) -buffers(dw9_d2, dw9_dc, 2) -buffers(dw9_d1, dw9_dc, 2) -buffers(dw9_d0, dw9_dc, 2) -buffers(dw9_dc, conv10, 2, 2) -buffers(conv10, dw10_d0, 4) -buffers(conv10, dw10_d1, 4) -buffers(conv10, dw10_d2, 4) -buffers(dw10_d2, dw10_dc, 2) -buffers(dw10_d1, dw10_dc, 2) -buffers(dw10_d0, dw10_dc, 2) -buffers(dw10_dc, conv11, 2, 2) -buffers(conv11, dw11_d0, 4) -buffers(conv11, dw11_d2, 4) -buffers(conv11, dw11_d1, 4, 4) -buffers(dw11_d1, dw11_dc, 2) -buffers(dw11_d2, dw11_dc, 2) -buffers(dw11_d0, dw11_dc, 2) -buffers(dw11_dc, conv12, 2) -buffers(conv12, dw12_d1, 5, 5) -buffers(conv12, shortcut_from_conv12_to_conv13_exp1_conv13_linear0_conv14_dw12_d0, 5, 5) -buffers(shortcut_from_conv12_to_conv13_exp1_conv13_linear0_conv14_dw12_d0, conv13_linear0, 5) -buffers(shortcut_from_conv12_to_conv13_exp1_conv13_linear0_conv14_dw12_d0, dw12_d0, 5, 5) -buffers(shortcut_from_conv12_to_conv13_exp1_conv13_linear0_conv14_dw12_d0, conv13_exp1, 5, 5) -buffers(shortcut_from_conv12_to_conv13_exp1_conv13_linear0_conv14_dw12_d0, conv14, 5, 5) -buffers(conv14, proposal_generator0_sd2, 38, 38) -buffers(conv14, proposal_generator0_sd0, 38, 38) -buffers(conv14, proposal_generator0_sd1, 38, 38) -buffers(conv13_exp1, bbox_decoder13, 2) -buffers(dw12_d0, dw12_dc, 2) -buffers(conv13_linear0, bbox_decoder13, 2, 2) -buffers(bbox_decoder13, proposal_generator0_sd2, 38, 38) -buffers(bbox_decoder13, proposal_generator0_sd0, 38, 38) -buffers(bbox_decoder13, proposal_generator0_sd1, 38, 38) -buffers(proposal_generator0_sd0, proposal_generator0_sdc, 2, 2) -buffers(proposal_generator0_sd1, proposal_generator0_sdc, 2, 2) -buffers(proposal_generator0_sd2, proposal_generator0_sdc, 2, 2) -buffers(proposal_generator0_sdc, proposal_generator0_concat, 26, 2) -buffers(dw12_d1, dw12_dc, 2) -buffers(dw12_dc, conv15, 2, 2) -buffers(conv15, dw13_d0, 4) -buffers(conv15, dw13_d1, 4) -buffers(dw13_d1, dw13_dc, 2, 2) -buffers(dw13_d0, dw13_dc, 2, 2) -buffers(dw13_dc, conv16_d0, 2) -buffers(dw13_dc, conv16_d1, 2) -buffers(conv16_d1, conv16_dc, 2) -buffers(conv16_d0, conv16_dc, 2) -buffers(conv16_dc, conv17_exp1, 2) -buffers(conv16_dc, conv18, 2) -buffers(conv16_dc, conv19, 2) -buffers(conv16_dc, conv17_linear0, 2, 2) -buffers(conv17_linear0, bbox_decoder17, 2) -buffers(conv19, conv20, 2, 2) -buffers(conv20, conv21_exp1, 2) -buffers(conv20, conv21_linear0, 2) -buffers(conv20, conv22, 2) -buffers(conv20, conv23, 2, 2) -buffers(conv23, conv24, 2, 2) -buffers(conv24, conv25_exp1, 2) -buffers(conv24, conv25_linear0, 2) -buffers(conv24, conv26, 2) -buffers(conv24, conv27, 2, 2) -buffers(conv27, conv28, 2, 2) -buffers(conv28, conv30, 2) -buffers(conv28, conv31, 2, 2) -buffers(conv28, conv29_linear0, 2, 2) -buffers(conv28, conv29_exp1, 2, 2) -buffers(conv29_exp1, bbox_decoder29, 2) -buffers(conv29_linear0, bbox_decoder29, 2) -buffers(bbox_decoder29, proposal_generator4, 4, 4) -buffers(conv31, conv32, 2) -buffers(conv32, conv33_exp1, 2) -buffers(conv32, conv33_linear0, 2) -buffers(conv32, conv34, 2) -buffers(conv34, proposal_generator5, 2) -buffers(conv33_linear0, bbox_decoder33, 2) -buffers(conv33_exp1, bbox_decoder33, 2) -buffers(bbox_decoder33, proposal_generator5, 2) -buffers(proposal_generator5, proposal_generator3_concat, 2, 2) -buffers(conv30, proposal_generator4, 4, 4) -buffers(proposal_generator4, proposal_generator3_concat, 22, 2) -buffers(conv26, proposal_generator3, 6) -buffers(conv25_linear0, bbox_decoder25, 2) -buffers(conv25_exp1, bbox_decoder25, 2) -buffers(bbox_decoder25, proposal_generator3, 6) -buffers(proposal_generator3, proposal_generator3_concat, 32) -buffers(proposal_generator3_concat, proposal_generator0_concat_concat, 2) -buffers(conv22, proposal_generator2, 10) -buffers(conv21_linear0, bbox_decoder21, 2) -buffers(conv21_exp1, bbox_decoder21, 2) -buffers(bbox_decoder21, proposal_generator2, 10) -buffers(proposal_generator2, proposal_generator0_concat, 2, 2) -buffers(conv18, proposal_generator1_sd0, 20, 20) -buffers(conv18, proposal_generator1_sd0, 20, 20) -buffers(conv17_exp1, bbox_decoder17, 2, 2) -buffers(bbox_decoder17, proposal_generator1_sd0, 20) -buffers(bbox_decoder17, proposal_generator1_sd1, 20) -buffers(proposal_generator1_sd1, proposal_generator1_sdc, 2) -buffers(proposal_generator1_sd0, proposal_generator1_sdc, 2) -buffers(proposal_generator1_sdc, proposal_generator0_concat, 22, 2) -buffers(proposal_generator0_concat, portal_proposal_generator0_concat_proposal_generator0_concat_concat, 22) -buffers(portal_proposal_generator0_concat_proposal_generator0_concat_concat, proposal_generator0_concat_concat, 54, 2) -buffers(proposal_generator0_concat_concat, nms1_d0, 4, 4) -buffers(proposal_generator0_concat_concat, nms1_d1, 4, 4) - -place(0, [conv9, conv17_exp1, conv18, conv19, conv23, dw9_d0, dw9_d1, dw9_d2, dw9_dc, dw12_d0, dw12_d1, dw12_dc, dw13_dc, conv16_d0, conv16_d1, conv16_dc]) -place(1, [conv4, conv13_exp1, bbox_decoder13, conv15, conv20, conv21_exp1, conv21_linear0, bbox_decoder21, conv22, proposal_generator2, dw4_d0, dw4_d1, dw4_d2, dw4_dc, dw13_d0, dw13_d1]) -place(2, [conv24, conv25_exp1, conv25_linear0, bbox_decoder25, conv26, conv28, conv30, proposal_generator3, proposal_generator3_concat, proposal_generator0_concat_concat, proposal_generator0_sd2]) -place(3, [conv27, conv31, conv32, conv33_exp1, conv33_linear0, bbox_decoder33, conv34, proposal_generator4, proposal_generator5, proposal_generator0_sd0, proposal_generator0_sd1]) -place(4, [conv2, conv3, conv14, proposal_generator0_sdc, dw1_d3, dw2_d0, dw2_d1, dw2_d2, dw2_dc, dw3_d0, dw3_d1, dw3_d2, dw3_d3, dw8_d1, shortcut_from_conv3_to_dw3_d0_dw3_d1_dw3_d2_dw3_d3, concat_to_dw3_dc_from_dw3_d0_dw3_d1_dw3_d2_dw3_d3]) -place(5, [normalization1, conv1, conv17_linear0, bbox_decoder17, conv29_exp1, conv29_linear0, bbox_decoder29, proposal_generator1_sd0, proposal_generator1_sd1, proposal_generator1_sdc, dw1_d0, dw1_d1, dw1_d2, dw1_dc]) -place(6, [conv5, conv6, conv10, conv13_linear0, dw5_d0, dw5_d1, dw5_d2, dw5_dc, dw8_d2, dw8_dc, dw10_d0, dw10_d1, dw10_d2, dw10_dc, dw11_d1, shortcut_from_conv12_to_conv13_exp1_conv13_linear0_conv14_dw12_d0]) -place(7, [dw6, conv7, conv8, conv11, conv12, proposal_generator0_concat, dw3_d4, dw3_dc, dw7_d0, dw7_d1, dw7_d2, dw7_dc, dw8_d0, dw11_d0, dw11_d2, dw11_dc]) - -performance_param(fps=1196) diff --git a/hailo_model_zoo/cfg/alls/performance/yolov5s.alls b/hailo_model_zoo/cfg/alls/performance/yolov5s.alls deleted file mode 100644 index 67f6bfb6..00000000 --- a/hailo_model_zoo/cfg/alls/performance/yolov5s.alls +++ /dev/null @@ -1,6 +0,0 @@ -normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0]) -change_output_activation(sigmoid) -model_optimization_config(calibration, batch_size=4, calibset_size=64) -pre_quantization_optimization(equalization, policy=disabled) -quantization_param({output_layer*}, precision_mode=a8_w8) -performance_param(fps=375) \ No newline at end of file diff --git a/hailo_model_zoo/cfg/base/base.yaml b/hailo_model_zoo/cfg/base/base.yaml index 1ab1f299..7c7f639b 100644 --- a/hailo_model_zoo/cfg/base/base.yaml +++ b/hailo_model_zoo/cfg/base/base.yaml @@ -7,6 +7,8 @@ quantization: hn_editor: yuv2rgb: false yuy2: false + nv12: false + rgbx: false input_resize: enabled: false channels_remove: @@ -66,7 +68,7 @@ postprocessing: max_finder: false sigmoid: false hpp: false - postprocess_config_json: null + postprocess_config_file: null evaluation: data_set: null labels_offset: 0 diff --git a/hailo_model_zoo/cfg/base/cifar100.yaml b/hailo_model_zoo/cfg/base/cifar100.yaml new file mode 100644 index 00000000..20ce91d9 --- /dev/null +++ b/hailo_model_zoo/cfg/base/cifar100.yaml @@ -0,0 +1,13 @@ +base: +- base/base.yaml +evaluation: + dataset_name: cifar100 + labels_offset: 0 + classes: 100 + data_set: models_files/cifar100/2023-03-09/cifar100_val.tfrecord + validation_data_set: models_files/cifar100/2023-03-09/cifar100_val.tfrecord +preprocessing: + network_type: classification +quantization: + calib_set: + - models_files/cifar100/2023-03-09/cifar100_calib.tfrecord diff --git a/hailo_model_zoo/cfg/base/clip.yaml b/hailo_model_zoo/cfg/base/clip.yaml new file mode 100644 index 00000000..78dbcc6a --- /dev/null +++ b/hailo_model_zoo/cfg/base/clip.yaml @@ -0,0 +1,16 @@ +base: +- base/cifar100.yaml +preprocessing: + meta_arch: clip + network_type: zero_shot_classification +parser: + normalization_params: + normalize_in_net: true + mean_list: + - 122.7709383 + - 116.7460125 + - 104.09373615000001 + std_list: + - 68.5005327 + - 66.6321579 + - 70.32316304999999 diff --git a/hailo_model_zoo/cfg/base/lol.yaml b/hailo_model_zoo/cfg/base/lol.yaml new file mode 100644 index 00000000..a621fc14 --- /dev/null +++ b/hailo_model_zoo/cfg/base/lol.yaml @@ -0,0 +1,7 @@ +quantization: + calib_set: + - models_files/LowLightEnhancement/LOL/2023-05-01/hailo_calib_set_lol.tfrecord +evaluation: + dataset_name: lol + data_set: models_files/LowLightEnhancement/LOL/2023-05-01/hailo_val_set_lol.tfrecord + validation_data_set: models_files/LowLightEnhancement/LOL/2023-05-01/hailo_val_set_lol.tfrecord diff --git a/hailo_model_zoo/cfg/base/repvgg.yaml b/hailo_model_zoo/cfg/base/repvgg.yaml new file mode 100644 index 00000000..1183e13d --- /dev/null +++ b/hailo_model_zoo/cfg/base/repvgg.yaml @@ -0,0 +1,24 @@ +base: +- base/imagenet.yaml +preprocessing: + meta_arch: resnet_pruned +info: + source: https://github.com/tensorflow/models/tree/master/research/slim + license_url: https://www.apache.org/licenses/LICENSE-2.0 +parser: + normalization_params: + normalize_in_net: true + mean_list: + - 123.675 + - 116.28 + - 103.53 + std_list: + - 58.395 + - 57.12 + - 57.375 +postprocessing: + device_pre_post_layers: + softmax: false + argmax: false + bilinear: false + nms: false diff --git a/hailo_model_zoo/cfg/base/tddfa.yaml b/hailo_model_zoo/cfg/base/tddfa.yaml index e0ecccc3..ba1aac2f 100644 --- a/hailo_model_zoo/cfg/base/tddfa.yaml +++ b/hailo_model_zoo/cfg/base/tddfa.yaml @@ -8,7 +8,7 @@ preprocessing: network_type: face_landmark_detection_3d meta_arch: face_landmark_cnn postprocessing: - postprocess_config_json: models_files/FaceLandmarks3d/tddfa/tddfa_mobilenet_v1/pretrained/2021-11-28/bfm_noneck_v3.pkl + postprocess_config_file: models_files/FaceLandmarks3d/tddfa/tddfa_mobilenet_v1/pretrained/2021-11-28/bfm_noneck_v3.pkl meta_arch: tddfa_postprocessing info: source: https://github.com/cleardusk/3DDFA_V2 diff --git a/hailo_model_zoo/cfg/base/vit.yaml b/hailo_model_zoo/cfg/base/vit.yaml index 9a53ceaa..dc8ae787 100644 --- a/hailo_model_zoo/cfg/base/vit.yaml +++ b/hailo_model_zoo/cfg/base/vit.yaml @@ -4,7 +4,7 @@ preprocessing: meta_arch: vit parser: normalization_params: - normalize_in_net: false + normalize_in_net: true mean_list: - 127.5 - 127.5 diff --git a/hailo_model_zoo/cfg/base/yolov6.yaml b/hailo_model_zoo/cfg/base/yolov6.yaml new file mode 100644 index 00000000..a0831111 --- /dev/null +++ b/hailo_model_zoo/cfg/base/yolov6.yaml @@ -0,0 +1,23 @@ +base: +- base/yolox.yaml +parser: + normalization_params: + normalize_in_net: true + mean_list: + - 0.0 + - 0.0 + - 0.0 + std_list: + - 255.0 + - 255.0 + - 255.0 + fold_normalization: true +preprocessing: + network_type: detection + meta_arch: yolo_v5 + centered: true + padding_color: 114 +postprocessing: + nms_iou_thresh: 0.65 + score_threshold: 0.03 + meta_arch: yolo_v6 diff --git a/hailo_model_zoo/cfg/base/yolov8_seg.yaml b/hailo_model_zoo/cfg/base/yolov8_seg.yaml new file mode 100644 index 00000000..78ebc8e8 --- /dev/null +++ b/hailo_model_zoo/cfg/base/yolov8_seg.yaml @@ -0,0 +1,12 @@ +base: +- base/yolov8.yaml +preprocessing: + network_type: instance_segmentation +postprocessing: + meta_arch: yolov8_seg_postprocess + mask_threshold: 0.5 +evaluation: + meta_arch: yolov8_seg + infer_type: np_infer_lite + dataset_name: coco_detection + gt_json_path: models_files/coco/2021-06-18/instances_val2017.json diff --git a/hailo_model_zoo/cfg/networks/arcface_mobilefacenet.yaml b/hailo_model_zoo/cfg/networks/arcface_mobilefacenet.yaml index 958cd870..74fac191 100644 --- a/hailo_model_zoo/cfg/networks/arcface_mobilefacenet.yaml +++ b/hailo_model_zoo/cfg/networks/arcface_mobilefacenet.yaml @@ -30,6 +30,6 @@ info: full_precision_result: 99.43 input_shape: 112x112x3 output_shape: '512' - operations: 0.44G + operations: 0.88G parameters: 2.04M license_url: https://opensource.org/licenses/MIT diff --git a/hailo_model_zoo/cfg/networks/arcface_mobilefacenet_nv12.yaml b/hailo_model_zoo/cfg/networks/arcface_mobilefacenet_nv12.yaml new file mode 100644 index 00000000..6322d994 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/arcface_mobilefacenet_nv12.yaml @@ -0,0 +1,21 @@ +base: +- networks/arcface_mobilefacenet.yaml +hn_editor: + nv12: true + yuv2rgb: true +network: + network_name: arcface_mobilefacenet_nv12 +paths: + alls_script: arcface_mobilefacenet_nv12.alls +info: + task: pipeline + framework: pytorch + training_data: ms1mv3 + validation_data: lfw + eval_metric: lfw verification accuracy + full_precision_result: 99.23 + input_shape: 56x112x3 + output_shape: '512' + operations: 0.88G + parameters: 2.04M + license_url: https://opensource.org/licenses/MIT diff --git a/hailo_model_zoo/cfg/networks/arcface_mobilefacenet_rgbx.yaml b/hailo_model_zoo/cfg/networks/arcface_mobilefacenet_rgbx.yaml new file mode 100644 index 00000000..06d2d6a8 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/arcface_mobilefacenet_rgbx.yaml @@ -0,0 +1,11 @@ +base: +- networks/arcface_mobilefacenet.yaml +network: + network_name: arcface_mobilefacenet_rgbx +paths: + alls_script: arcface_mobilefacenet_rgbx.alls +hn_editor: + rgbx: true +info: + task: pipeline + input_shape: 112x112x4 diff --git a/hailo_model_zoo/cfg/networks/arcface_r50.yaml b/hailo_model_zoo/cfg/networks/arcface_r50.yaml index 22b89d9a..5a9eac15 100644 --- a/hailo_model_zoo/cfg/networks/arcface_r50.yaml +++ b/hailo_model_zoo/cfg/networks/arcface_r50.yaml @@ -30,6 +30,6 @@ info: full_precision_result: 99.72 input_shape: 112x112x3 output_shape: '512' - operations: 6.30G + operations: 12.6G parameters: 31.0M license_url: https://opensource.org/licenses/MIT diff --git a/hailo_model_zoo/cfg/networks/centernet_resnet_v1_18_postprocess.yaml b/hailo_model_zoo/cfg/networks/centernet_resnet_v1_18_postprocess.yaml index ca13f0f8..11ee4dca 100644 --- a/hailo_model_zoo/cfg/networks/centernet_resnet_v1_18_postprocess.yaml +++ b/hailo_model_zoo/cfg/networks/centernet_resnet_v1_18_postprocess.yaml @@ -25,7 +25,7 @@ info: task: object detection input_shape: 512x512x3 output_shape: 128x128x80, 128x128x2, 128x128x2 - operations: 15.63G + operations: 31.26G parameters: 14.22M framework: gluoncv training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/centernet_resnet_v1_50_postprocess.yaml b/hailo_model_zoo/cfg/networks/centernet_resnet_v1_50_postprocess.yaml index 0f3850a0..3bd6973a 100644 --- a/hailo_model_zoo/cfg/networks/centernet_resnet_v1_50_postprocess.yaml +++ b/hailo_model_zoo/cfg/networks/centernet_resnet_v1_50_postprocess.yaml @@ -28,7 +28,7 @@ info: task: object detection input_shape: 512x512x3 output_shape: 128x128x80, 128x128x2, 128x128x2 - operations: 28.46G + operations: 56.92G parameters: 30.07M framework: gluoncv training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/centerpose_regnetx_1.6gf_fpn.yaml b/hailo_model_zoo/cfg/networks/centerpose_regnetx_1.6gf_fpn.yaml index 456ec90a..44e8d1c0 100644 --- a/hailo_model_zoo/cfg/networks/centerpose_regnetx_1.6gf_fpn.yaml +++ b/hailo_model_zoo/cfg/networks/centerpose_regnetx_1.6gf_fpn.yaml @@ -54,7 +54,7 @@ info: task: pose estimation input_shape: 640x640x3 output_shape: 160x160x1, 160x160x2, 160x160x34, 160x160x2, 160x160x17, 160x160x2 - operations: 32.38G + operations: 57.19G parameters: 14.28M framework: pytorch training_data: coco keypoints train2017 diff --git a/hailo_model_zoo/cfg/networks/centerpose_regnetx_800mf.yaml b/hailo_model_zoo/cfg/networks/centerpose_regnetx_800mf.yaml index d767ac13..064f7cd3 100644 --- a/hailo_model_zoo/cfg/networks/centerpose_regnetx_800mf.yaml +++ b/hailo_model_zoo/cfg/networks/centerpose_regnetx_800mf.yaml @@ -20,7 +20,7 @@ info: task: pose estimation input_shape: 512x512x3 output_shape: 128x128x1, 128x128x2, 128x128x34, 128x128x2, 128x128x17, 128x128x2 - operations: 43.06G + operations: 86.12G parameters: 12.31M framework: pytorch training_data: coco keypoints train2017 diff --git a/hailo_model_zoo/cfg/networks/centerpose_repvgg_a0.yaml b/hailo_model_zoo/cfg/networks/centerpose_repvgg_a0.yaml index 42dde1be..1aafc823 100644 --- a/hailo_model_zoo/cfg/networks/centerpose_repvgg_a0.yaml +++ b/hailo_model_zoo/cfg/networks/centerpose_repvgg_a0.yaml @@ -54,7 +54,7 @@ info: task: pose estimation input_shape: 416x416x3 output_shape: 104x104x1, 104x104x2, 104x104x34, 104x104x2, 104x104x17, 104x104x2 - operations: 14.15G + operations: 24.76G parameters: 11.71M framework: pytorch training_data: coco keypoints train2017 diff --git a/hailo_model_zoo/cfg/networks/clip_resnet_50.yaml b/hailo_model_zoo/cfg/networks/clip_resnet_50.yaml new file mode 100644 index 00000000..7453a685 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/clip_resnet_50.yaml @@ -0,0 +1,24 @@ +base: +- base/clip.yaml +network: + network_name: clip_resnet_50 +postprocessing: + postprocess_config_file: models_files/cifar100/2023-03-09/class_token_resnet50.npy +paths: + network_path: + - models_files/Classification/clip_resnet_50/pretrained/2023-03-09/clip_resnet_50.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/Classification/clip_resnet_50/pretrained/2023-03-09/clip_resnet_50.zip + alls_script: clip_resnet_50.alls +info: + task: zero-shot classification + input_shape: 224x224x3 + output_shape: 1x1x1024 + operations: 11.62G + parameters: 38.72M + framework: pytorch + training_data: internal + validation_data: cifar100 + eval_metric: Accuracy (top1) + source: https://github.com/openai/CLIP + full_precision_result: 42.07 + license_url: https://opensource.org/licenses/MIT diff --git a/hailo_model_zoo/cfg/networks/damoyolo_tinynasL20_T.yaml b/hailo_model_zoo/cfg/networks/damoyolo_tinynasL20_T.yaml index d061ff58..b9c4c243 100644 --- a/hailo_model_zoo/cfg/networks/damoyolo_tinynasL20_T.yaml +++ b/hailo_model_zoo/cfg/networks/damoyolo_tinynasL20_T.yaml @@ -19,7 +19,7 @@ parser: info: task: object detection input_shape: 640x640x3 - output_shape: 80x80x68, 80x80x81, 40X40X68, 40X40X81, 20X20X68, 20X20X81 - operations: 9.03G + output_shape: 80x80x68, 80x80x81, 40x40x68, 40x40x81, 20x20x68, 20x20x81 + operations: 18.06G parameters: 11.35M full_precision_result: 42.8 diff --git a/hailo_model_zoo/cfg/networks/damoyolo_tinynasL25_S.yaml b/hailo_model_zoo/cfg/networks/damoyolo_tinynasL25_S.yaml index 3189445b..9af7d16b 100644 --- a/hailo_model_zoo/cfg/networks/damoyolo_tinynasL25_S.yaml +++ b/hailo_model_zoo/cfg/networks/damoyolo_tinynasL25_S.yaml @@ -19,7 +19,7 @@ parser: info: task: object detection input_shape: 640x640x3 - output_shape: 80x80x68, 80x80x81, 40X40X68, 40X40X81, 20X20X68, 20X20X81 - operations: 18.85G + output_shape: 80x80x68, 80x80x81, 40x40x68, 40x40x81, 20x20x68, 20x20x81 + operations: 37.7G parameters: 16.25M full_precision_result: 46.53 diff --git a/hailo_model_zoo/cfg/networks/damoyolo_tinynasL35_M.yaml b/hailo_model_zoo/cfg/networks/damoyolo_tinynasL35_M.yaml index 37907d5e..18ef00c0 100644 --- a/hailo_model_zoo/cfg/networks/damoyolo_tinynasL35_M.yaml +++ b/hailo_model_zoo/cfg/networks/damoyolo_tinynasL35_M.yaml @@ -19,7 +19,7 @@ parser: info: task: object detection input_shape: 640x640x3 - output_shape: 80x80x68, 80x80x81, 40X40X68, 40X40X81, 20X20X68, 20X20X81 - operations: 30.87G + output_shape: 80x80x68, 80x80x81, 40x40x68, 40x40x81, 20x20x68, 20x20x81 + operations: 61.74G parameters: 33.98M full_precision_result: 49.7 diff --git a/hailo_model_zoo/cfg/networks/deeplab_v3_mobilenet_v2.yaml b/hailo_model_zoo/cfg/networks/deeplab_v3_mobilenet_v2.yaml index 12d07d6b..a3db5fe7 100644 --- a/hailo_model_zoo/cfg/networks/deeplab_v3_mobilenet_v2.yaml +++ b/hailo_model_zoo/cfg/networks/deeplab_v3_mobilenet_v2.yaml @@ -36,7 +36,7 @@ info: task: semantic segmentation input_shape: 513x513x3 output_shape: 513x513x21 - operations: 8.91G + operations: 17.82G parameters: 2.10M framework: keras training_data: pascal voc train2012 diff --git a/hailo_model_zoo/cfg/networks/deeplab_v3_mobilenet_v2_wo_dilation.yaml b/hailo_model_zoo/cfg/networks/deeplab_v3_mobilenet_v2_wo_dilation.yaml index c0ae6f21..25521900 100644 --- a/hailo_model_zoo/cfg/networks/deeplab_v3_mobilenet_v2_wo_dilation.yaml +++ b/hailo_model_zoo/cfg/networks/deeplab_v3_mobilenet_v2_wo_dilation.yaml @@ -34,7 +34,7 @@ info: task: semantic segmentation input_shape: 513x513x3 output_shape: 513x513x1 - operations: 1.64G + operations: 3.28G parameters: 2.10M framework: tensorflow training_data: pascal voc train2012 diff --git a/hailo_model_zoo/cfg/networks/detr_resnet_v1_18_bn.yaml b/hailo_model_zoo/cfg/networks/detr_resnet_v1_18_bn.yaml new file mode 100644 index 00000000..da8b54fe --- /dev/null +++ b/hailo_model_zoo/cfg/networks/detr_resnet_v1_18_bn.yaml @@ -0,0 +1,45 @@ +base: +- base/coco.yaml +quantization: + calib_set: + - models_files/coco/2021-06-18/coco_calib2017.tfrecord +preprocessing: + meta_arch: detr + network_type: detection +postprocessing: + meta_arch: detr_resnet_v1_18_bn +network: + network_name: detr_resnet_v1_18_bn +paths: + alls_script: detr_resnet_v1_18_bn.alls + network_path: + - models_files/ObjectDetection/Detection-COCO/detr/detr_r18/detr_resnet_v1_18/2022-09-18/detr_resnet_v1_18_bn.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/detr/detr_r18/detr_resnet_v1_18/2022-09-18/detr_resnet_v1_18_bn.zip +parser: + nodes: + - Conv_195 + - - Add_3451 + - Sigmoid_3460 + normalization_params: + normalize_in_net: true + mean_list: + - 123.675 + - 116.28 + - 103.53 + std_list: + - 58.395 + - 57.12 + - 57.375 +info: + task: object detection + input_shape: 800x800x3 + output_shape: 100x4, 100x92 + operations: 59.16G + parameters: 32.42M + framework: pytorch + training_data: coco train2017 + validation_data: coco val2017 + eval_metric: mAP + full_precision_result: 33.9 + source: https://github.com/facebookresearch/detr + license_url: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/hailo_model_zoo/cfg/networks/efficientdet_lite0.yaml b/hailo_model_zoo/cfg/networks/efficientdet_lite0.yaml index d95411dc..48000d60 100644 --- a/hailo_model_zoo/cfg/networks/efficientdet_lite0.yaml +++ b/hailo_model_zoo/cfg/networks/efficientdet_lite0.yaml @@ -5,8 +5,8 @@ network: paths: alls_script: efficientdet_lite0.alls network_path: - - models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite0/pretrained/2022-06-14/efficientdet-lite0.tflite - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite0/pretrained/2022-06-14/efficientdet-lite0.zip + - models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite0/pretrained/2023-04-25/efficientdet-lite0.tflite + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite0/pretrained/2023-04-25/efficientdet-lite0.zip parser: nodes: - pad_to_bounding_box/Pad @@ -26,38 +26,22 @@ preprocessing: - 320 - 3 postprocessing: - anchors: - aspect_ratios: - - 1.0 - - 0.5 - - 2.0 - sizes: - - 24 - - 48 - - 96 - - 192 - - 320 - strides: - - 8 - - 16 - - 32 - - 64 - - 106.6666667 - scales: - - 1.0 - - 1.2599211 - - 1.587401 + device_pre_post_layers: + nms: true + sigmoid: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite0/pretrained/2023-04-25/efficientdet_lite0_nms_config.json + hpp: true info: task: object detection input_shape: 320x320x3 output_shape: 40x40x36, 40x40x810, 20x20x36, 20x20x810, 10x10x36, 10x10x810, 5x5x36, 5x5x810, 3x3x36, 3x3x810 - operations: 0.99G + operations: 1.98G parameters: 3.56M framework: tensorflow training_data: coco train2017 validation_data: coco val2017 eval_metric: mAP - full_precision_result: 27.435 + full_precision_result: 27.317 source: https://github.com/google/automl/tree/master/efficientdet license_url: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/hailo_model_zoo/cfg/networks/efficientdet_lite1.yaml b/hailo_model_zoo/cfg/networks/efficientdet_lite1.yaml index da4165a3..9b6d1026 100644 --- a/hailo_model_zoo/cfg/networks/efficientdet_lite1.yaml +++ b/hailo_model_zoo/cfg/networks/efficientdet_lite1.yaml @@ -5,8 +5,8 @@ network: paths: alls_script: efficientdet_lite1.alls network_path: - - models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite1/pretrained/2022-06-26/efficientdet-lite1.tflite - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite1/pretrained/2022-06-26/efficientdet-lite1.zip + - models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite1/pretrained/2023-04-25/efficientdet-lite1.tflite + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite1/pretrained/2023-04-25/efficientdet-lite1.zip parser: nodes: - efficientnet-lite1/stem/Relu6;efficientnet-lite1/stem/tpu_batch_normalization/FusedBatchNormV3;efficientnet-lite1/blocks_0/tpu_batch_normalization/FusedBatchNormV3;efficientnet-lite1/blocks_0/depthwise_conv2d/depthwise;efficientnet-lite1/stem/conv2d/Conv2D @@ -26,38 +26,22 @@ preprocessing: - 384 - 3 postprocessing: - anchors: - aspect_ratios: - - 1.0 - - 0.5 - - 2.0 - sizes: - - 24 - - 48 - - 96 - - 192 - - 384 - strides: - - 8 - - 16 - - 32 - - 64 - - 128 - scales: - - 1.0 - - 1.2599211 - - 1.587401 + device_pre_post_layers: + nms: true + sigmoid: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite1/pretrained/2023-04-25/efficientdet_lite1_nms_config.json + hpp: true info: task: object detection input_shape: 384x384x3 output_shape: 48x48x36, 48x48x810, 24x24x36, 24x24x810, 12x12x36, 12x12x810, 6x6x36, 6x6x810, 3x3x36, 3x3x810 - operations: 2G + operations: 4G parameters: 4.73M framework: tensorflow training_data: coco train2017 validation_data: coco val2017 eval_metric: mAP - full_precision_result: 32.458 + full_precision_result: 32.271 source: https://github.com/google/automl/tree/master/efficientdet license_url: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/hailo_model_zoo/cfg/networks/efficientdet_lite2.yaml b/hailo_model_zoo/cfg/networks/efficientdet_lite2.yaml index 30a6c5c0..cd8f6f96 100644 --- a/hailo_model_zoo/cfg/networks/efficientdet_lite2.yaml +++ b/hailo_model_zoo/cfg/networks/efficientdet_lite2.yaml @@ -5,8 +5,8 @@ network: paths: alls_script: efficientdet_lite2.alls network_path: - - models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite2/pretrained/2022-06-26/efficientdet-lite2.tflite - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite2/pretrained/2022-06-26/efficientdet-lite2.zip + - models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite2/pretrained/2023-04-25/efficientdet-lite2.tflite + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite2/pretrained/2023-04-25/efficientdet-lite2.zip parser: nodes: - efficientnet-lite2/stem/Relu6;efficientnet-lite2/stem/tpu_batch_normalization/FusedBatchNormV3;efficientnet-lite2/blocks_0/tpu_batch_normalization/FusedBatchNormV3;efficientnet-lite2/blocks_0/depthwise_conv2d/depthwise;efficientnet-lite2/stem/conv2d/Conv2D @@ -26,38 +26,22 @@ preprocessing: - 448 - 3 postprocessing: - anchors: - aspect_ratios: - - 1.0 - - 0.5 - - 2.0 - sizes: - - 24 - - 48 - - 96 - - 192 - - 336 - strides: - - 8 - - 16 - - 32 - - 64 - - 112 - scales: - - 1.0 - - 1.2599211 - - 1.587401 + device_pre_post_layers: + nms: true + sigmoid: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/efficientdet/efficientdet_lite2/pretrained/2023-04-25/efficientdet_lite2_nms_config.json + hpp: true info: task: object detection input_shape: 448x448x3 output_shape: 56x56x36, 56x56x810, 28x28x36, 28x28x810, 14x14x36, 14x14x810, 7x7x36, 7x7x810, 4x4x36, 4x4x810 - operations: 3.42G + operations: 6.84G parameters: 5.93M framework: tensorflow training_data: coco train2017 validation_data: coco val2017 eval_metric: mAP - full_precision_result: 36.157 + full_precision_result: 35.949 source: https://github.com/google/automl/tree/master/efficientdet license_url: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/hailo_model_zoo/cfg/networks/efficientnet_l.yaml b/hailo_model_zoo/cfg/networks/efficientnet_l.yaml index c9c7ca4b..6c29b7d2 100644 --- a/hailo_model_zoo/cfg/networks/efficientnet_l.yaml +++ b/hailo_model_zoo/cfg/networks/efficientnet_l.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 300x300x3 output_shape: 1x1x1001 - operations: 9.70G + operations: 19.4G parameters: 10.55M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/efficientnet_lite0.yaml b/hailo_model_zoo/cfg/networks/efficientnet_lite0.yaml index 411aee5e..933f6385 100644 --- a/hailo_model_zoo/cfg/networks/efficientnet_lite0.yaml +++ b/hailo_model_zoo/cfg/networks/efficientnet_lite0.yaml @@ -13,7 +13,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1000' - operations: 0.39G + operations: 0.78G parameters: 4.63M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/efficientnet_lite1.yaml b/hailo_model_zoo/cfg/networks/efficientnet_lite1.yaml index 912c3fed..e84f53ce 100644 --- a/hailo_model_zoo/cfg/networks/efficientnet_lite1.yaml +++ b/hailo_model_zoo/cfg/networks/efficientnet_lite1.yaml @@ -13,7 +13,7 @@ info: task: classification input_shape: 240x240x3 output_shape: '1000' - operations: 0.61G + operations: 1.22G parameters: 5.39M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/efficientnet_lite2.yaml b/hailo_model_zoo/cfg/networks/efficientnet_lite2.yaml index 4045ef61..322cc038 100644 --- a/hailo_model_zoo/cfg/networks/efficientnet_lite2.yaml +++ b/hailo_model_zoo/cfg/networks/efficientnet_lite2.yaml @@ -13,7 +13,7 @@ info: task: classification input_shape: 260x260x3 output_shape: '1000' - operations: 0.87G + operations: 1.74G parameters: 6.06M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/efficientnet_lite3.yaml b/hailo_model_zoo/cfg/networks/efficientnet_lite3.yaml index 2edcb5ae..5bd30065 100644 --- a/hailo_model_zoo/cfg/networks/efficientnet_lite3.yaml +++ b/hailo_model_zoo/cfg/networks/efficientnet_lite3.yaml @@ -13,7 +13,7 @@ info: task: classification input_shape: 280x280x3 output_shape: '1000' - operations: 1.40G + operations: 2.8G parameters: 8.16M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/efficientnet_lite4.yaml b/hailo_model_zoo/cfg/networks/efficientnet_lite4.yaml index bfa471d2..1924d691 100644 --- a/hailo_model_zoo/cfg/networks/efficientnet_lite4.yaml +++ b/hailo_model_zoo/cfg/networks/efficientnet_lite4.yaml @@ -13,7 +13,7 @@ info: task: classification input_shape: 300x300x3 output_shape: '1000' - operations: 2.58G + operations: 5.10G parameters: 12.95M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/efficientnet_m.yaml b/hailo_model_zoo/cfg/networks/efficientnet_m.yaml index 0cb61f83..23a736be 100644 --- a/hailo_model_zoo/cfg/networks/efficientnet_m.yaml +++ b/hailo_model_zoo/cfg/networks/efficientnet_m.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 240x240x3 output_shape: '1001' - operations: 3.68G + operations: 7.32G parameters: 6.87M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/efficientnet_s.yaml b/hailo_model_zoo/cfg/networks/efficientnet_s.yaml index c9936520..4cbf9f27 100644 --- a/hailo_model_zoo/cfg/networks/efficientnet_s.yaml +++ b/hailo_model_zoo/cfg/networks/efficientnet_s.yaml @@ -27,7 +27,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1001' - operations: 2.36G + operations: 4.72G parameters: 5.41M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/espcn_x2.yaml b/hailo_model_zoo/cfg/networks/espcn_x2.yaml index 17ec9a71..a9b875d1 100644 --- a/hailo_model_zoo/cfg/networks/espcn_x2.yaml +++ b/hailo_model_zoo/cfg/networks/espcn_x2.yaml @@ -24,7 +24,7 @@ info: task: super resolution input_shape: 156x240x1 output_shape: 312x480x1 - operations: 0.8G + operations: 1.6G parameters: 0.02M framework: pytorch training_data: T91 diff --git a/hailo_model_zoo/cfg/networks/espcn_x3.yaml b/hailo_model_zoo/cfg/networks/espcn_x3.yaml index b9a45cc8..7b98519d 100644 --- a/hailo_model_zoo/cfg/networks/espcn_x3.yaml +++ b/hailo_model_zoo/cfg/networks/espcn_x3.yaml @@ -24,7 +24,7 @@ info: task: super resolution input_shape: 104x160x1 output_shape: 312x480x1 - operations: 0.38G + operations: 0.76G parameters: 0.02M framework: pytorch training_data: T91 diff --git a/hailo_model_zoo/cfg/networks/espcn_x4.yaml b/hailo_model_zoo/cfg/networks/espcn_x4.yaml index da1199d2..54dfd866 100644 --- a/hailo_model_zoo/cfg/networks/espcn_x4.yaml +++ b/hailo_model_zoo/cfg/networks/espcn_x4.yaml @@ -14,7 +14,7 @@ info: task: super resolution input_shape: 78x120x1 output_shape: 312x480x1 - operations: 0.23G + operations: 0.46G parameters: 0.02M framework: pytorch training_data: T91 diff --git a/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18.yaml b/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18.yaml index 60c7fc0a..5400e1c7 100644 --- a/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18.yaml +++ b/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18.yaml @@ -28,7 +28,7 @@ info: task: face attribute input_shape: 218x178x3 output_shape: 1x80 - operations: 1.5G + operations: 3G parameters: 11.74M framework: pytorch training_data: celeba train diff --git a/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18_nv12.yaml b/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18_nv12.yaml new file mode 100644 index 00000000..cac70f2b --- /dev/null +++ b/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18_nv12.yaml @@ -0,0 +1,13 @@ +base: +- base/celeba.yaml +- networks/face_attr_resnet_v1_18.yaml +hn_editor: + yuv2rgb: true + nv12: true +network: + network_name: face_attr_resnet_v1_18_nv12 +paths: + alls_script: face_attr_resnet_v1_18_nv12.alls +info: + task: pipeline + input_shape: 109x178x3 diff --git a/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18_rgbx.yaml b/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18_rgbx.yaml new file mode 100644 index 00000000..d0b36c93 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/face_attr_resnet_v1_18_rgbx.yaml @@ -0,0 +1,12 @@ +base: +- base/celeba.yaml +- networks/face_attr_resnet_v1_18.yaml +network: + network_name: face_attr_resnet_v1_18_rgbx +paths: + alls_script: face_attr_resnet_v1_18_rgbx.alls +hn_editor: + rgbx: true +info: + task: pipeline + input_shape: 218x178x4 diff --git a/hailo_model_zoo/cfg/networks/fast_depth.yaml b/hailo_model_zoo/cfg/networks/fast_depth.yaml index 883d75a1..829ad37e 100644 --- a/hailo_model_zoo/cfg/networks/fast_depth.yaml +++ b/hailo_model_zoo/cfg/networks/fast_depth.yaml @@ -36,7 +36,7 @@ info: task: Depth Estimation input_shape: 224x224x3 output_shape: 224x224x1 - operations: 0.37G + operations: 0.74G parameters: 1.35M framework: pytorch training_data: nyu_depth_v2 train diff --git a/hailo_model_zoo/cfg/networks/fast_depth_nv12_fhd.yaml b/hailo_model_zoo/cfg/networks/fast_depth_nv12_fhd.yaml new file mode 100644 index 00000000..522026c8 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/fast_depth_nv12_fhd.yaml @@ -0,0 +1,54 @@ +base: +- base/base.yaml +evaluation: + data_set: models_files/nyu_depth_v2/2020-11-01/nyu_depth_v2_val.tfrecord + validation_data_set: models_files/nyu_depth_v2/2020-11-01/nyu_depth_v2_val.tfrecord + dataset_name: nyu_depth_v2 +preprocessing: + network_type: fast_depth + meta_arch: fast_depth +quantization: + calib_set: + - models_files/nyu_depth_v2/2020-11-01/nyu_depth_v2_calib.tfrecord +network: + network_name: fast_depth_nv12_fhd +paths: + alls_script: fast_depth_nv12_fhd.alls + network_path: + - models_files/DepthEstimation/indoor/fast_depth/pretrained/2021-10-18/fastdepth.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/DepthEstimation/indoor/fast_depth/pretrained/2021-10-18/fast_depth.zip +parser: + nodes: + - null + - null + normalization_params: + normalize_in_net: true + fold_normalization: true + mean_list: + - 0 + - 0 + - 0 + std_list: + - 255 + - 255 + - 255 +hn_editor: + yuv2rgb: true + nv12: true + input_resize: + enabled: true + input_shape: + - 1080 + - 1920 +info: + task: pipeline_hailo15 + input_shape: 540x1920x3 + output_shape: 224x224x1 + operations: 0.77G + parameters: 1.35M + framework: pytorch + training_data: nyu_depth_v2 train + validation_data: nyu_depth_v2 validation + eval_metric: RMSE + source: https://github.com/dwofk/fast-depth + full_precision_result: 0.61 diff --git a/hailo_model_zoo/cfg/networks/fcn16_resnet_v1_18.yaml b/hailo_model_zoo/cfg/networks/fcn16_resnet_v1_18.yaml index 0dcea36f..86f464e0 100644 --- a/hailo_model_zoo/cfg/networks/fcn16_resnet_v1_18.yaml +++ b/hailo_model_zoo/cfg/networks/fcn16_resnet_v1_18.yaml @@ -19,7 +19,7 @@ info: task: semantic segmentation input_shape: 1024x1920x3 output_shape: 1024x1920x1 - operations: 71.26G + operations: 142.52G parameters: 11.19M framework: pytorch training_data: cityscapes train diff --git a/hailo_model_zoo/cfg/networks/fcn8_resnet_v1_18.yaml b/hailo_model_zoo/cfg/networks/fcn8_resnet_v1_18.yaml index 37c4881f..0dd6dbbd 100644 --- a/hailo_model_zoo/cfg/networks/fcn8_resnet_v1_18.yaml +++ b/hailo_model_zoo/cfg/networks/fcn8_resnet_v1_18.yaml @@ -17,7 +17,7 @@ info: task: semantic segmentation input_shape: 1024x1920x3 output_shape: 1024x1920x1 - operations: 71.51G + operations: 143.02G parameters: 11.20M framework: pytorch training_data: cityscapes train diff --git a/hailo_model_zoo/cfg/networks/fcn8_resnet_v1_22.yaml b/hailo_model_zoo/cfg/networks/fcn8_resnet_v1_22.yaml index a6515c5c..2ecd1560 100644 --- a/hailo_model_zoo/cfg/networks/fcn8_resnet_v1_22.yaml +++ b/hailo_model_zoo/cfg/networks/fcn8_resnet_v1_22.yaml @@ -28,7 +28,7 @@ info: task: semantic segmentation input_shape: 1920x1024x3 output_shape: 1920x1024x1 - operations: 150.04G + operations: 300.08G parameters: 15.12M framework: gluoncv training_data: cityscapes train diff --git a/hailo_model_zoo/cfg/networks/hand_landmark_lite.yaml b/hailo_model_zoo/cfg/networks/hand_landmark_lite.yaml index 5241b211..67fcabc8 100644 --- a/hailo_model_zoo/cfg/networks/hand_landmark_lite.yaml +++ b/hailo_model_zoo/cfg/networks/hand_landmark_lite.yaml @@ -3,8 +3,6 @@ base: evaluation: dataset_name: hand_landmark network_type: landmark_detection - data_set: null - validation_data_set: null preprocessing: network_type: landmark_detection meta_arch: face_landmark_cnn @@ -34,7 +32,7 @@ info: task: hand landmark detection input_shape: 224x224x3 output_shape: 1x1, 1x1, 1x63, 1x63 - operations: 0.15G + operations: 0.3G parameters: 1.01M framework: tflite training_data: internal diff --git a/hailo_model_zoo/cfg/networks/hardnet39ds.yaml b/hailo_model_zoo/cfg/networks/hardnet39ds.yaml index f1debf7e..61c83496 100644 --- a/hailo_model_zoo/cfg/networks/hardnet39ds.yaml +++ b/hailo_model_zoo/cfg/networks/hardnet39ds.yaml @@ -15,7 +15,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 0.43G + operations: 0.86G parameters: 3.48M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/hardnet68.yaml b/hailo_model_zoo/cfg/networks/hardnet68.yaml index 93815460..3a53f898 100644 --- a/hailo_model_zoo/cfg/networks/hardnet68.yaml +++ b/hailo_model_zoo/cfg/networks/hardnet68.yaml @@ -15,7 +15,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 4.25G + operations: 8.5G parameters: 17.56M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/inception_v1.yaml b/hailo_model_zoo/cfg/networks/inception_v1.yaml index d16fed2c..b04ae653 100644 --- a/hailo_model_zoo/cfg/networks/inception_v1.yaml +++ b/hailo_model_zoo/cfg/networks/inception_v1.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1001 - operations: 1.50G + operations: 3G parameters: 6.62M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/lightface_slim_nv12.yaml b/hailo_model_zoo/cfg/networks/lightface_slim_nv12.yaml new file mode 100644 index 00000000..8ad57082 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/lightface_slim_nv12.yaml @@ -0,0 +1,12 @@ +base: +- base/lightface_slim_base.yaml +paths: + alls_script: lightface_slim_nv12.alls +network: + network_name: lightface_slim_nv12 +hn_editor: + yuv2rgb: true + nv12: true +info: + task: pipeline_hailo15 + input_shape: 120X320x3 diff --git a/hailo_model_zoo/cfg/networks/lightface_slim_nv12_fhd.yaml b/hailo_model_zoo/cfg/networks/lightface_slim_nv12_fhd.yaml new file mode 100644 index 00000000..f60a61ba --- /dev/null +++ b/hailo_model_zoo/cfg/networks/lightface_slim_nv12_fhd.yaml @@ -0,0 +1,23 @@ +base: +- base/lightface_slim_base.yaml +paths: + alls_script: lightface_slim_nv12_fhd.alls +network: + network_name: lightface_slim_nv12_fhd +hn_editor: + yuv2rgb: true + nv12: true + input_resize: + enabled: true + input_shape: + - 1080 + - 1920 +preprocessing: + input_shape: + - 240 + - 320 + - 3 +info: + task: pipeline_hailo15 + input_shape: 540x1920x3 + full_percision_result: 39.043 diff --git a/hailo_model_zoo/cfg/networks/lprnet.yaml b/hailo_model_zoo/cfg/networks/lprnet.yaml index adf8faf9..c583b95e 100644 --- a/hailo_model_zoo/cfg/networks/lprnet.yaml +++ b/hailo_model_zoo/cfg/networks/lprnet.yaml @@ -37,7 +37,7 @@ info: task: pipeline input_shape: 75x300x3 output_shape: 5x19x11 - operations: 18.29G + operations: 36.58G parameters: 7.14M framework: pytorch eval_metric: Accuracy diff --git a/hailo_model_zoo/cfg/networks/lprnet_yuy2.yaml b/hailo_model_zoo/cfg/networks/lprnet_yuy2.yaml index f40cce47..38f6843b 100644 --- a/hailo_model_zoo/cfg/networks/lprnet_yuy2.yaml +++ b/hailo_model_zoo/cfg/networks/lprnet_yuy2.yaml @@ -40,7 +40,7 @@ info: task: pipeline input_shape: 75x304x2 output_shape: 5x19x11 - operations: 18.53G + operations: 37.01G parameters: 7.14M framework: pytorch eval_metric: Accuracy diff --git a/hailo_model_zoo/cfg/networks/mobilenet_v1.yaml b/hailo_model_zoo/cfg/networks/mobilenet_v1.yaml index 3d366cf7..59997b96 100644 --- a/hailo_model_zoo/cfg/networks/mobilenet_v1.yaml +++ b/hailo_model_zoo/cfg/networks/mobilenet_v1.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1001 - operations: 0.57G + operations: 1.14G parameters: 4.22M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/mobilenet_v2_1.0.yaml b/hailo_model_zoo/cfg/networks/mobilenet_v2_1.0.yaml index 8d409f16..a10f88f0 100644 --- a/hailo_model_zoo/cfg/networks/mobilenet_v2_1.0.yaml +++ b/hailo_model_zoo/cfg/networks/mobilenet_v2_1.0.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1001' - operations: 0.31G + operations: 0.62G parameters: 3.49M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/mobilenet_v2_1.4.yaml b/hailo_model_zoo/cfg/networks/mobilenet_v2_1.4.yaml index babf8a54..1ab9c99f 100644 --- a/hailo_model_zoo/cfg/networks/mobilenet_v2_1.4.yaml +++ b/hailo_model_zoo/cfg/networks/mobilenet_v2_1.4.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1001 - operations: 0.59G + operations: 1.18G parameters: 6.09M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/mobilenet_v3.yaml b/hailo_model_zoo/cfg/networks/mobilenet_v3.yaml index d32f2993..504a6ac0 100644 --- a/hailo_model_zoo/cfg/networks/mobilenet_v3.yaml +++ b/hailo_model_zoo/cfg/networks/mobilenet_v3.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1001' - operations: 1.00G + operations: 2G parameters: 4.07M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/mobilenet_v3_large_minimalistic.yaml b/hailo_model_zoo/cfg/networks/mobilenet_v3_large_minimalistic.yaml index daa22a83..a6064259 100644 --- a/hailo_model_zoo/cfg/networks/mobilenet_v3_large_minimalistic.yaml +++ b/hailo_model_zoo/cfg/networks/mobilenet_v3_large_minimalistic.yaml @@ -20,7 +20,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1001' - operations: 0.21G + operations: 0.42G parameters: 3.91M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/mspn_regnetx_800mf.yaml b/hailo_model_zoo/cfg/networks/mspn_regnetx_800mf.yaml index 9ca30169..d857ee94 100644 --- a/hailo_model_zoo/cfg/networks/mspn_regnetx_800mf.yaml +++ b/hailo_model_zoo/cfg/networks/mspn_regnetx_800mf.yaml @@ -34,7 +34,7 @@ info: task: single person pose estimation input_shape: 256x192x3 output_shape: 64x48x17 - operations: 1.47G + operations: 2.94G parameters: 7.17M framework: pytorch eval_metric: AP diff --git a/hailo_model_zoo/cfg/networks/mspn_regnetx_800mf_nv12.yaml b/hailo_model_zoo/cfg/networks/mspn_regnetx_800mf_nv12.yaml new file mode 100644 index 00000000..9bb3cfed --- /dev/null +++ b/hailo_model_zoo/cfg/networks/mspn_regnetx_800mf_nv12.yaml @@ -0,0 +1,46 @@ +base: +- base/base.yaml +- base/coco_single_person.yaml +preprocessing: + network_type: single_person_pose_estimation + meta_arch: mspn +postprocessing: + meta_arch: mspn +network: + network_name: mspn_regnetx_800mf_nv12 +paths: + alls_script: mspn_regnetx_800mf_nv12.alls + network_path: + - models_files/SinglePersonPoseEstimation/mspn_regnetx_800mf/pretrained/2022-07-12/mspn_regnetx_800mf.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/SinglePersonPoseEstimation/mspn_regnetx_800mf/pretrained/2022-07-12/mspn_regnetx_800mf.zip +parser: + nodes: + - input.1 + - - Conv_197 + normalization_params: + normalize_in_net: true + mean_list: + - 123.675 + - 116.28 + - 103.53 + std_list: + - 58.395 + - 57.12 + - 57.375 +evaluation: + network_type: single_person_pose_estimation + infer_type: np_infer +hn_editor: + yuv2rgb: true + nv12: true +info: + task: pipeline_hailo15 + input_shape: 128x192x3 + output_shape: 64x48x17 + operations: 2.94G + parameters: 7.17M + framework: pytorch + eval_metric: AP + full_precision_result: 70.579 + source: https://github.com/open-mmlab/mmpose + license_url: https://github.com/open-mmlab/mmpose/blob/master/LICENSE diff --git a/hailo_model_zoo/cfg/networks/nanodet_repvgg.yaml b/hailo_model_zoo/cfg/networks/nanodet_repvgg.yaml index 5d40f86b..b56c7f48 100644 --- a/hailo_model_zoo/cfg/networks/nanodet_repvgg.yaml +++ b/hailo_model_zoo/cfg/networks/nanodet_repvgg.yaml @@ -22,7 +22,7 @@ info: task: object detection input_shape: 416x416x3 output_shape: 52x52x124, 26x26x124, 13x13x124 - operations: 5.64G + operations: 11.28G parameters: 6.74M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/nanodet_repvgg_a12.yaml b/hailo_model_zoo/cfg/networks/nanodet_repvgg_a12.yaml new file mode 100644 index 00000000..9a0e5469 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/nanodet_repvgg_a12.yaml @@ -0,0 +1,35 @@ +base: +- base/yolox.yaml +network: + network_name: nanodet_repvgg_a12 +paths: + network_path: + - models_files/ObjectDetection/Detection-COCO/nanodet/nanodet_repvgg_a12/pretrained/2023-05-31/nanodet_repvgg_a12_640x640.onnx + alls_script: nanodet_repvgg_a12.alls + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/nanodet/nanodet_repvgg_a12/pretrained/2023-05-31/nanodet_repvgg_a12_640x640.zip +parser: + nodes: + - null + - - Conv_70 + - Sigmoid_72 + - Sigmoid_73 + - Conv_86 + - Sigmoid_88 + - Sigmoid_89 + - Conv_102 + - Sigmoid_104 + - Sigmoid_105 +info: + task: object detection + input_shape: 640x640x3 + output_shape: 80x80x4, 80x80x1, 80x80x80, 40x40x4, 40x40x1, 40x40x80, 20x20x4, 20x20x1, + 20x20x80 + operations: 28.23G + parameters: 5.13M + framework: pytorch + training_data: coco train2017 + validation_data: coco val2017 + eval_metric: mAP + full_precision_result: 33.7 + source: https://github.com/Megvii-BaseDetection/YOLOX + license_url: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/hailo_model_zoo/cfg/networks/nanodet_repvgg_a1_640.yaml b/hailo_model_zoo/cfg/networks/nanodet_repvgg_a1_640.yaml index f4b979c0..b519506c 100644 --- a/hailo_model_zoo/cfg/networks/nanodet_repvgg_a1_640.yaml +++ b/hailo_model_zoo/cfg/networks/nanodet_repvgg_a1_640.yaml @@ -17,7 +17,7 @@ info: task: object detection input_shape: 640x640x3 output_shape: 80x80x124, 40x40x124, 20x20x124 - operations: 21.4G + operations: 42.8G parameters: 10.79M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/osnet_x1_0.yaml b/hailo_model_zoo/cfg/networks/osnet_x1_0.yaml index 0e02ae5b..dc81d7b1 100644 --- a/hailo_model_zoo/cfg/networks/osnet_x1_0.yaml +++ b/hailo_model_zoo/cfg/networks/osnet_x1_0.yaml @@ -25,7 +25,7 @@ info: task: person re-id input_shape: 256x128x3 output_shape: 1x512 - operations: 0.99G + operations: 1.98G parameters: 2.19M framework: pytorch training_data: market1501 train diff --git a/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18.yaml b/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18.yaml index 3306b65a..20248197 100644 --- a/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18.yaml +++ b/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18.yaml @@ -34,7 +34,7 @@ info: task: person attribute input_shape: 224x224x3 output_shape: 1x35 - operations: 1.82G + operations: 3.64G parameters: 11.19M framework: pytorch training_data: peta train diff --git a/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18_nv12.yaml b/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18_nv12.yaml new file mode 100644 index 00000000..d09c52c0 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18_nv12.yaml @@ -0,0 +1,13 @@ +base: +- base/peta.yaml +- networks/person_attr_resnet_v1_18.yaml +hn_editor: + yuv2rgb: true + nv12: true +network: + network_name: person_attr_resnet_v1_18_nv12 +paths: + alls_script: person_attr_resnet_v1_18_nv12.alls +info: + task: pipeline + input_shape: 112x224x3 diff --git a/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18_rgbx.yaml b/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18_rgbx.yaml new file mode 100644 index 00000000..4adead1b --- /dev/null +++ b/hailo_model_zoo/cfg/networks/person_attr_resnet_v1_18_rgbx.yaml @@ -0,0 +1,12 @@ +base: +- base/peta.yaml +- networks/person_attr_resnet_v1_18.yaml +network: + network_name: person_attr_resnet_v1_18_rgbx +paths: + alls_script: person_attr_resnet_v1_18_rgbx.alls +hn_editor: + rgbx: true +info: + task: pipeline + input_shape: 224x224x4 diff --git a/hailo_model_zoo/cfg/networks/regnetx_1.6gf.yaml b/hailo_model_zoo/cfg/networks/regnetx_1.6gf.yaml index efce2299..e1e3772d 100644 --- a/hailo_model_zoo/cfg/networks/regnetx_1.6gf.yaml +++ b/hailo_model_zoo/cfg/networks/regnetx_1.6gf.yaml @@ -15,7 +15,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1000' - operations: 1.61G + operations: 3.22G parameters: 9.17M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/regnetx_800mf.yaml b/hailo_model_zoo/cfg/networks/regnetx_800mf.yaml index 9aa21589..fe4ce15d 100644 --- a/hailo_model_zoo/cfg/networks/regnetx_800mf.yaml +++ b/hailo_model_zoo/cfg/networks/regnetx_800mf.yaml @@ -15,7 +15,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1000' - operations: 0.80G + operations: 1.6G parameters: 7.24M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/regnety_200mf.yaml b/hailo_model_zoo/cfg/networks/regnety_200mf.yaml index 6392c579..ecbfcb30 100644 --- a/hailo_model_zoo/cfg/networks/regnety_200mf.yaml +++ b/hailo_model_zoo/cfg/networks/regnety_200mf.yaml @@ -15,7 +15,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1000' - operations: 0.20G + operations: 0.4G parameters: 3.15M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/repvgg_a0_person_reid_2048.yaml b/hailo_model_zoo/cfg/networks/repvgg_a0_person_reid_2048.yaml index 93ed9879..dc4691c9 100644 --- a/hailo_model_zoo/cfg/networks/repvgg_a0_person_reid_2048.yaml +++ b/hailo_model_zoo/cfg/networks/repvgg_a0_person_reid_2048.yaml @@ -25,7 +25,7 @@ info: task: person re-id input_shape: 256x128x3 output_shape: 1x2048 - operations: 0.89G + operations: 1.78G parameters: 9.65M framework: pytorch training_data: market1501 train diff --git a/hailo_model_zoo/cfg/networks/repvgg_a0_person_reid_512.yaml b/hailo_model_zoo/cfg/networks/repvgg_a0_person_reid_512.yaml index c904603f..022391e8 100644 --- a/hailo_model_zoo/cfg/networks/repvgg_a0_person_reid_512.yaml +++ b/hailo_model_zoo/cfg/networks/repvgg_a0_person_reid_512.yaml @@ -25,7 +25,7 @@ info: task: person re-id input_shape: 256x128x3 output_shape: 1x512 - operations: 0.89G + operations: 1.78G parameters: 7.68M framework: pytorch training_data: market1501 train diff --git a/hailo_model_zoo/cfg/networks/repvgg_a1.yaml b/hailo_model_zoo/cfg/networks/repvgg_a1.yaml new file mode 100644 index 00000000..eb867c1d --- /dev/null +++ b/hailo_model_zoo/cfg/networks/repvgg_a1.yaml @@ -0,0 +1,26 @@ +base: +- base/repvgg.yaml +network: + network_name: repvgg_a1 +paths: + alls_script: repvgg_a1.alls + network_path: + - models_files/Classification/repvgg/repvgg_a1/pretrained/2022-10-02/RepVGG-A1.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/Classification/repvgg/repvgg_a1/pretrained/2022-10-02/RepVGG-A1.zip +parser: + nodes: + - null + - null +info: + task: classification + input_shape: 224x224x3 + output_shape: 1x1x1000 + operations: 4.7G + parameters: 12.79M + framework: pytorch + training_data: imagenet train + validation_data: imagenet val + eval_metric: Accuracy (top1) + full_precision_result: 74.4 + source: https://github.com/DingXiaoH/RepVGG + license_url: https://github.com/DingXiaoH/RepVGG/blob/main/LICENSE diff --git a/hailo_model_zoo/cfg/networks/repvgg_a2.yaml b/hailo_model_zoo/cfg/networks/repvgg_a2.yaml new file mode 100644 index 00000000..009ce6e2 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/repvgg_a2.yaml @@ -0,0 +1,26 @@ +base: +- base/repvgg.yaml +network: + network_name: repvgg_a2 +paths: + alls_script: repvgg_a2.alls + network_path: + - models_files/Classification/repvgg/repvgg_a2/pretrained/2022-10-02/RepVGG-A2.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/Classification/repvgg/repvgg_a2/pretrained/2022-10-02/RepVGG-A2.zip +parser: + nodes: + - null + - null +info: + task: classification + input_shape: 224x224x3 + output_shape: 1x1x1000 + operations: 10.2G + parameters: 25.5M + framework: pytorch + training_data: imagenet train + validation_data: imagenet val + eval_metric: Accuracy (top1) + full_precision_result: 76.52 + source: https://github.com/DingXiaoH/RepVGG + license_url: https://github.com/DingXiaoH/RepVGG/blob/main/LICENSE diff --git a/hailo_model_zoo/cfg/networks/resmlp12_relu.yaml b/hailo_model_zoo/cfg/networks/resmlp12_relu.yaml index 3ca0687b..e29af21f 100644 --- a/hailo_model_zoo/cfg/networks/resmlp12_relu.yaml +++ b/hailo_model_zoo/cfg/networks/resmlp12_relu.yaml @@ -22,7 +22,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 3.02G + operations: 6.04G parameters: 15.77M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/resnet_v1_18.yaml b/hailo_model_zoo/cfg/networks/resnet_v1_18.yaml index 145082e5..d3725f7e 100644 --- a/hailo_model_zoo/cfg/networks/resnet_v1_18.yaml +++ b/hailo_model_zoo/cfg/networks/resnet_v1_18.yaml @@ -21,7 +21,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 1.82G + operations: 3.64G parameters: 11.68M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/resnet_v1_34.yaml b/hailo_model_zoo/cfg/networks/resnet_v1_34.yaml index 34cc232b..204dd20f 100644 --- a/hailo_model_zoo/cfg/networks/resnet_v1_34.yaml +++ b/hailo_model_zoo/cfg/networks/resnet_v1_34.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 3.67G + operations: 7.34G parameters: 21.79M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/resnet_v1_50.yaml b/hailo_model_zoo/cfg/networks/resnet_v1_50.yaml index 23a2817d..f4558659 100644 --- a/hailo_model_zoo/cfg/networks/resnet_v1_50.yaml +++ b/hailo_model_zoo/cfg/networks/resnet_v1_50.yaml @@ -29,7 +29,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 3.49G + operations: 6.98G parameters: 25.53M framework: tensorflow training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/resnet_v2_18.yaml b/hailo_model_zoo/cfg/networks/resnet_v2_18.yaml index f41cc236..c35ce3dc 100644 --- a/hailo_model_zoo/cfg/networks/resnet_v2_18.yaml +++ b/hailo_model_zoo/cfg/networks/resnet_v2_18.yaml @@ -11,7 +11,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 1.82G + operations: 3.64G parameters: 11.68M framework: mxnet training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/resnet_v2_34.yaml b/hailo_model_zoo/cfg/networks/resnet_v2_34.yaml index 14e0c9c3..45045547 100644 --- a/hailo_model_zoo/cfg/networks/resnet_v2_34.yaml +++ b/hailo_model_zoo/cfg/networks/resnet_v2_34.yaml @@ -10,7 +10,7 @@ paths: info: task: classification input_shape: 224x224x3 - operations: 3.67G + operations: 7.34G parameters: 21.79M framework: mxnet training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/resnext26_32x4d.yaml b/hailo_model_zoo/cfg/networks/resnext26_32x4d.yaml index 0998f646..bbf337b0 100644 --- a/hailo_model_zoo/cfg/networks/resnext26_32x4d.yaml +++ b/hailo_model_zoo/cfg/networks/resnext26_32x4d.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 2.48G + operations: 4.96G parameters: 15.37M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/resnext50_32x4d.yaml b/hailo_model_zoo/cfg/networks/resnext50_32x4d.yaml index 2de4768b..d900d96c 100644 --- a/hailo_model_zoo/cfg/networks/resnext50_32x4d.yaml +++ b/hailo_model_zoo/cfg/networks/resnext50_32x4d.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 4.24G + operations: 8.48G parameters: 24.99M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/retinaface_mobilenet_v1.yaml b/hailo_model_zoo/cfg/networks/retinaface_mobilenet_v1.yaml index ebab18cd..79e3a0b1 100644 --- a/hailo_model_zoo/cfg/networks/retinaface_mobilenet_v1.yaml +++ b/hailo_model_zoo/cfg/networks/retinaface_mobilenet_v1.yaml @@ -26,7 +26,7 @@ info: input_shape: 736x1280x3 output_shape: 92x160x8, 92x160x4, 92x160x20, 46x80x8, 46x80x4, 46x80x20, 23x40x8, 23x40x4, 23x40x20 - operations: 12.57G + operations: 25.14G parameters: 3.49M framework: pytorch training_data: wider train diff --git a/hailo_model_zoo/cfg/networks/retinaface_mobilenet_v1_rgbx.yaml b/hailo_model_zoo/cfg/networks/retinaface_mobilenet_v1_rgbx.yaml new file mode 100644 index 00000000..57747eb4 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/retinaface_mobilenet_v1_rgbx.yaml @@ -0,0 +1,11 @@ +base: +- networks/retinaface_mobilenet_v1.yaml +network: + network_name: retinaface_mobilenet_v1_rgbx +paths: + alls_script: retinaface_mobilenet_v1_rgbx.alls +hn_editor: + rgbx: true +info: + task: pipeline + input_shape: 736x1280x4 diff --git a/hailo_model_zoo/cfg/networks/scrfd_10g.yaml b/hailo_model_zoo/cfg/networks/scrfd_10g.yaml index dfeab220..e28b5e31 100644 --- a/hailo_model_zoo/cfg/networks/scrfd_10g.yaml +++ b/hailo_model_zoo/cfg/networks/scrfd_10g.yaml @@ -24,7 +24,7 @@ info: input_shape: 640x640x3 output_shape: 80x80x2, 80x80x8, 80x80x10, 40x40x2, 40x40x8, 40x40x10, 20x20x2, 20x20x8, 20x20x10 - operations: 13.37G + operations: 26.74G parameters: 4.23M framework: pytorch training_data: wider train diff --git a/hailo_model_zoo/cfg/networks/scrfd_10g_nv12_fhd.yaml b/hailo_model_zoo/cfg/networks/scrfd_10g_nv12_fhd.yaml new file mode 100644 index 00000000..a428e9e8 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/scrfd_10g_nv12_fhd.yaml @@ -0,0 +1,32 @@ +base: +- networks/scrfd_10g.yaml +hn_editor: + yuv2rgb: true + nv12: true + input_resize: + enabled: true + input_shape: + - 1080 + - 1920 +network: + network_name: scrfd_10g_nv12_fhd +paths: + alls_script: scrfd_10g_nv12_fhd.alls +preprocessing: + input_shape: + - 640 + - 640 + - 3 +info: + task: pipeline_hailo15 + input_shape: 540x1920x3 + output_shape: 80x80x2, 80x80x8, 80x80x10, 40x40x2, 40x40x8, 40x40x10, 20x20x2, 20x20x8, + 20x20x10 + operations: 26.74G + parameters: 4.23M + framework: pytorch + training_data: wider train + validation_data: wider val + eval_metric: mAP + full_precision_result: 82.426 + license_url: https://opensource.org/licenses/MIT diff --git a/hailo_model_zoo/cfg/networks/scrfd_2.5g.yaml b/hailo_model_zoo/cfg/networks/scrfd_2.5g.yaml index d73a7ffc..08b8c3f0 100644 --- a/hailo_model_zoo/cfg/networks/scrfd_2.5g.yaml +++ b/hailo_model_zoo/cfg/networks/scrfd_2.5g.yaml @@ -24,7 +24,7 @@ info: input_shape: 640x640x3 output_shape: 80x80x2, 80x80x8, 80x80x10, 40x40x2, 40x40x8, 40x40x10, 20x20x2, 20x20x8, 20x20x10 - operations: 3.44G + operations: 6.88G parameters: 0.82M framework: pytorch training_data: wider train diff --git a/hailo_model_zoo/cfg/networks/scrfd_500m.yaml b/hailo_model_zoo/cfg/networks/scrfd_500m.yaml index 62b0590d..a4911d0f 100644 --- a/hailo_model_zoo/cfg/networks/scrfd_500m.yaml +++ b/hailo_model_zoo/cfg/networks/scrfd_500m.yaml @@ -24,7 +24,7 @@ info: input_shape: 640x640x3 output_shape: 80x80x2, 80x80x8, 80x80x10, 40x40x2, 40x40x8, 40x40x10, 20x20x2, 20x20x8, 20x20x10 - operations: 0.75G + operations: 1.5G parameters: 0.63M framework: pytorch training_data: wider train diff --git a/hailo_model_zoo/cfg/networks/shufflenet_g8_w1.yaml b/hailo_model_zoo/cfg/networks/shufflenet_g8_w1.yaml index f21e18f8..30135535 100644 --- a/hailo_model_zoo/cfg/networks/shufflenet_g8_w1.yaml +++ b/hailo_model_zoo/cfg/networks/shufflenet_g8_w1.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 0.18G + operations: 0.36G parameters: 2.46M framework: Pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/squeezenet_v1.1.yaml b/hailo_model_zoo/cfg/networks/squeezenet_v1.1.yaml index eb820759..2964d63c 100644 --- a/hailo_model_zoo/cfg/networks/squeezenet_v1.1.yaml +++ b/hailo_model_zoo/cfg/networks/squeezenet_v1.1.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: 1x1x1000 - operations: 0.39G + operations: 0.78G parameters: 1.24M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1.yaml b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1.yaml index 3f631554..60c5d1ab 100644 --- a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1.yaml +++ b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1.yaml @@ -7,7 +7,7 @@ postprocessing: softmax: false bilinear: false nms: true - postprocess_config_json: models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1/pretrained/2021-07-11/mobilenet_ssd_nms_postprocess_config.json meta_arch: ssd anchors: predefined: true @@ -39,7 +39,7 @@ info: task: object detection input_shape: 300x300x3 output_shape: 90x5x20 - operations: 1.25G + operations: 2.5G parameters: 6.79M framework: tensorflow training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_hd.yaml b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_hd.yaml index f2c89fb0..0f3e3f6f 100644 --- a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_hd.yaml +++ b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_hd.yaml @@ -4,16 +4,26 @@ base: preprocessing: meta_arch: mobilenet_ssd_ar postprocessing: - nms_iou_thresh: 0.5 + device_pre_post_layers: + argmax: false + softmax: false + bilinear: false + nms: true + sigmoid: true + hpp: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2023-04-25/mobilenet_ssd_hd_nms_postprocess_config.json + meta_arch: ssd + anchors: + predefined: true network: network_name: ssd_mobilenet_v1_hd paths: alls_script: ssd_mobilenet_v1_hd.alls network_path: - - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2021-07-11/mobilenet_ssd_h720xw1280_AR_90classes.ckpt.meta - - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2021-07-11/mobilenet_ssd_h720xw1280_AR_90classes.ckpt.index - - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2021-07-11/mobilenet_ssd_h720xw1280_AR_90classes.ckpt.data-00000-of-00001 - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2021-07-11/ssd_mobilenet_v1_hd.zip + - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2023-04-25/mobilenet_ssd_h720xw1280_AR_90classes.ckpt.meta + - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2023-04-25/mobilenet_ssd_h720xw1280_AR_90classes.ckpt.index + - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2023-04-25/mobilenet_ssd_h720xw1280_AR_90classes.ckpt.data-00000-of-00001 + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v1_hd/pretrained/2023-04-25/ssd_mobilenet_v1_hd.zip parser: nodes: - FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/Conv2D @@ -34,7 +44,7 @@ info: input_shape: 720x1280x3 output_shape: 45x80x12, 45x80x273, 23x40x24, 23x40x546, 12x20x24, 12x20x546, 6x10x24, 6x10x546, 3x5x24, 3x5x546, 2x3x24, 2x3x546 - operations: 12.26G + operations: 24.52G parameters: 6.81M framework: tensorflow training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_no_alls.yaml b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_no_alls.yaml index f9395b36..6b18fa8c 100644 --- a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_no_alls.yaml +++ b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_no_alls.yaml @@ -7,5 +7,5 @@ paths: info: task: object detection input_shape: 300x300x3 - operations: 1.25G + operations: 2.5G parameters: 6.79M diff --git a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_visdrone.yaml b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_visdrone.yaml index 71ec628b..895900a3 100644 --- a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_visdrone.yaml +++ b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1_visdrone.yaml @@ -7,7 +7,7 @@ postprocessing: softmax: false bilinear: false nms: true - postprocess_config_json: models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2021-07-11/mobilenet_ssd_nms_visdrone_postprocess_config.json + postprocess_config_file: models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2023-06-07/mobilenet_ssd_nms_visdrone_postprocess_config.json meta_arch: ssd anchors: predefined: true @@ -16,10 +16,10 @@ network: paths: alls_script: ssd_mobilenet_v1_visdrone.alls network_path: - - models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2021-07-11/mobilenet_ssd_visdrone.ckpt.meta - - models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2021-07-11/mobilenet_ssd_visdrone.ckpt.index - - models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2021-07-11/mobilenet_ssd_visdrone.ckpt.data-00000-of-00001 - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2021-07-11/ssd_mobilenet_v1_visdrone.zip + - models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2023-06-07/mobilenet_ssd_visdrone.ckpt.meta + - models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2023-06-07/mobilenet_ssd_visdrone.ckpt.index + - models_files/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2023-06-07/mobilenet_ssd_visdrone.ckpt.data-00000-of-00001 + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-Visdrone/ssd/ssd_mobilenet_v1_visdrone/pretrained/2023-06-07/ssd_mobilenet_v1_visdrone.zip parser: nodes: - FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/Conv2D @@ -39,7 +39,7 @@ info: task: object detection input_shape: 300x300x3 output_shape: 2244x8x1 - operations: 1.15G + operations: 2.3G parameters: 5.64M framework: tensorflow training_data: visdrone train2019 diff --git a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v2.yaml b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v2.yaml index 96d2b149..11bd3e1f 100644 --- a/hailo_model_zoo/cfg/networks/ssd_mobilenet_v2.yaml +++ b/hailo_model_zoo/cfg/networks/ssd_mobilenet_v2.yaml @@ -7,7 +7,7 @@ postprocessing: softmax: false bilinear: false nms: true - postprocess_config_json: models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2021-07-11/mobilenet_v2_ssd_nms_postprocess_config.json + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2023-03-16/mobilenet_v2_ssd_nms_postprocess_config.json meta_arch: ssd anchors: predefined: true @@ -16,10 +16,10 @@ network: paths: alls_script: ssd_mobilenet_v2.alls network_path: - - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2021-07-11/model.ckpt.meta - - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2021-07-11/model.ckpt.index - - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2021-07-11/model.ckpt.data-00000-of-00001 - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2021-07-11/ssd_mobilenet_v2.zip + - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2023-03-16/model.ckpt.meta + - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2023-03-16/model.ckpt.index + - models_files/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2023-03-16/model.ckpt.data-00000-of-00001 + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/ssd/ssd_mobilenet_v2/pretrained/2023-03-16/ssd_mobilenet_v2.zip parser: nodes: - FeatureExtractor/MobilenetV2/MobilenetV2/input @@ -39,7 +39,7 @@ info: task: object detection input_shape: 300x300x3 output_shape: 2244x8x1 - operations: 0.76G + operations: 1.52G parameters: 4.46M framework: tensorflow training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/stdc1.yaml b/hailo_model_zoo/cfg/networks/stdc1.yaml index 2e1c4a72..8805ec01 100644 --- a/hailo_model_zoo/cfg/networks/stdc1.yaml +++ b/hailo_model_zoo/cfg/networks/stdc1.yaml @@ -9,13 +9,13 @@ parser: paths: alls_script: stdc1.alls network_path: - - models_files/Segmentation/Cityscapes/stdc1/pretrained/2022-03-17/stdc1.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/Segmentation/Cityscapes/stdc1/pretrained/2022-03-17/stdc1.zip + - models_files/Segmentation/Cityscapes/stdc1/pretrained/2023-06-12/stdc1-sim.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/Segmentation/Cityscapes/stdc1/pretrained/2023-06-12/stdc1.zip info: task: semantic segmentation input_shape: 1024x1920x3 output_shape: 1024x1920x1 - operations: 63.34G + operations: 126.47G parameters: 8.27M framework: pytorch training_data: cityscapes train diff --git a/hailo_model_zoo/cfg/networks/tddfa_mobilenet_v1.yaml b/hailo_model_zoo/cfg/networks/tddfa_mobilenet_v1.yaml index 1a487d1e..75e54bb0 100644 --- a/hailo_model_zoo/cfg/networks/tddfa_mobilenet_v1.yaml +++ b/hailo_model_zoo/cfg/networks/tddfa_mobilenet_v1.yaml @@ -11,7 +11,7 @@ info: task: facial landmark detection input_shape: 120x120x3 output_shape: '62' - operations: 0.18G + operations: 0.36G parameters: 3.26M framework: pytorch training_data: aflw2k3d train diff --git a/hailo_model_zoo/cfg/networks/tddfa_mobilenet_v1_nv12.yaml b/hailo_model_zoo/cfg/networks/tddfa_mobilenet_v1_nv12.yaml new file mode 100644 index 00000000..ac5c3880 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/tddfa_mobilenet_v1_nv12.yaml @@ -0,0 +1,25 @@ +base: +- base/tddfa.yaml +network: + network_name: tddfa_mobilenet_v1_nv12 +paths: + network_path: + - models_files/FaceLandmarks3d/tddfa/tddfa_mobilenet_v1/pretrained/2021-11-28/tddfa_mobilenet_v1_120x120.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/FaceLandmarks3d/tddfa/tddfa_mobilenet_v1/pretrained/2021-11-28/tddfa_mobilenet_v1.zip + alls_script: tddfa_mobilenet_v1_nv12.alls +hn_editor: + yuv2rgb: true + nv12: true +info: + task: pipeline_hailo15 + input_shape: 60x120x3 + output_shape: '62' + operations: 0.36G + parameters: 3.26M + framework: pytorch + training_data: aflw2k3d train + validation_data: aflw2k3d val + eval_metric: NME + full_precision_result: 3.67 + source: https://github.com/cleardusk/3DDFA_V2 + license_url: https://opensource.org/licenses/MIT diff --git a/hailo_model_zoo/cfg/networks/tiny_yolov3.yaml b/hailo_model_zoo/cfg/networks/tiny_yolov3.yaml index ce1688fc..aa9aed30 100644 --- a/hailo_model_zoo/cfg/networks/tiny_yolov3.yaml +++ b/hailo_model_zoo/cfg/networks/tiny_yolov3.yaml @@ -40,7 +40,7 @@ info: task: object detection input_shape: 416x416x3 output_shape: 13x13x6, 13x13x6, 13x13x3, 13x13x240, 26x26x6, 26x26x6, 26x26x3, 26x26x240 - operations: 2.79G + operations: 5.58G parameters: 8.85M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/tiny_yolov4.yaml b/hailo_model_zoo/cfg/networks/tiny_yolov4.yaml index e266b5c0..fd327ad3 100644 --- a/hailo_model_zoo/cfg/networks/tiny_yolov4.yaml +++ b/hailo_model_zoo/cfg/networks/tiny_yolov4.yaml @@ -47,7 +47,7 @@ info: task: object detection input_shape: 416x416x3 output_shape: 13x13x255, 26x26x255, 26x26x255 - operations: 3.46G + operations: 6.92G parameters: 6.05M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/tiny_yolov4_license_plates.yaml b/hailo_model_zoo/cfg/networks/tiny_yolov4_license_plates.yaml index f05c1d5b..354817bd 100644 --- a/hailo_model_zoo/cfg/networks/tiny_yolov4_license_plates.yaml +++ b/hailo_model_zoo/cfg/networks/tiny_yolov4_license_plates.yaml @@ -48,7 +48,7 @@ info: task: pipeline input_shape: 416x416x3 output_shape: 13x13x18, 26x26x18 - operations: 3.4G + operations: 6.8G parameters: 5.87M framework: darknet eval_metric: mAP diff --git a/hailo_model_zoo/cfg/networks/tiny_yolov4_license_plates_yuy2.yaml b/hailo_model_zoo/cfg/networks/tiny_yolov4_license_plates_yuy2.yaml index a5eb0bfb..3ff6a2d7 100644 --- a/hailo_model_zoo/cfg/networks/tiny_yolov4_license_plates_yuy2.yaml +++ b/hailo_model_zoo/cfg/networks/tiny_yolov4_license_plates_yuy2.yaml @@ -51,7 +51,7 @@ info: task: pipeline input_shape: 416x416x2 output_shape: 13x13x18, 26x26x18 - operations: 3.4G + operations: 6.8G parameters: 5.87M framework: darknet eval_metric: mAP diff --git a/hailo_model_zoo/cfg/networks/unet_mobilenet_v2.yaml b/hailo_model_zoo/cfg/networks/unet_mobilenet_v2.yaml index d81ed79e..362a9632 100644 --- a/hailo_model_zoo/cfg/networks/unet_mobilenet_v2.yaml +++ b/hailo_model_zoo/cfg/networks/unet_mobilenet_v2.yaml @@ -35,7 +35,7 @@ info: task: semantic segmentation input_shape: 256x256x3 output_shape: 256x256x3 - operations: 14.44G + operations: 28.88G parameters: 10.08M framework: TF2 training_data: oxford-IIIT pets diff --git a/hailo_model_zoo/cfg/networks/vit_base.yaml b/hailo_model_zoo/cfg/networks/vit_base.yaml index fc5931fd..31fc1187 100644 --- a/hailo_model_zoo/cfg/networks/vit_base.yaml +++ b/hailo_model_zoo/cfg/networks/vit_base.yaml @@ -15,7 +15,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1000' - operations: 17.1G + operations: 34.2G parameters: 86.5M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/vit_small.yaml b/hailo_model_zoo/cfg/networks/vit_small.yaml new file mode 100644 index 00000000..22dc2943 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/vit_small.yaml @@ -0,0 +1,27 @@ +base: +- base/vit.yaml +network: + network_name: vit_small +paths: + network_path: + - models_files/Classification/vit_small/pretrained/2022-08-08/vit_small_bn_ffnbn_relu_patch16_224.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/Classification/vit_small/pretrained/2022-08-08/vit_small.zip + alls_script: vit_small.alls +parser: + nodes: + - input.1 + - '955' +evaluation: + infer_type: model_infer +info: + task: classification + input_shape: 224x224x3 + output_shape: '1000' + operations: 8.5G + parameters: 21.12M + framework: pytorch + training_data: imagenet train + validation_data: imagenet val + eval_metric: Accuracy (top1) + source: https://github.com/rwightman/pytorch-image-models + full_precision_result: 78.12 diff --git a/hailo_model_zoo/cfg/networks/vit_tiny.yaml b/hailo_model_zoo/cfg/networks/vit_tiny.yaml index fc4dd559..6f176094 100644 --- a/hailo_model_zoo/cfg/networks/vit_tiny.yaml +++ b/hailo_model_zoo/cfg/networks/vit_tiny.yaml @@ -17,7 +17,7 @@ info: task: classification input_shape: 224x224x3 output_shape: '1000' - operations: 2.36G + operations: 4.72G parameters: 5.41M framework: pytorch training_data: imagenet train diff --git a/hailo_model_zoo/cfg/networks/yolact_mobilenet_v1.yaml b/hailo_model_zoo/cfg/networks/yolact_mobilenet_v1.yaml index b79f2ba4..f80d1098 100644 --- a/hailo_model_zoo/cfg/networks/yolact_mobilenet_v1.yaml +++ b/hailo_model_zoo/cfg/networks/yolact_mobilenet_v1.yaml @@ -51,7 +51,7 @@ info: input_shape: 512x512x3 output_shape: 128x128x32, 64x64x12, 64x64x96, 64x64x243, 32x32x12, 32x32x96, 32x32x243, 16x16x12, 16x16x96, 16x16x243, 8x8x12, 8x8x96, 8x8x243, 4x4x12, 4x4x96, 4x4x243 - operations: 51.92G + operations: 103.84G parameters: 19.11M framework: pytorch training_data: coco instances train2017 diff --git a/hailo_model_zoo/cfg/networks/yolact_regnetx_1.6gf.yaml b/hailo_model_zoo/cfg/networks/yolact_regnetx_1.6gf.yaml index b0ad25c2..cc590209 100644 --- a/hailo_model_zoo/cfg/networks/yolact_regnetx_1.6gf.yaml +++ b/hailo_model_zoo/cfg/networks/yolact_regnetx_1.6gf.yaml @@ -36,7 +36,7 @@ info: input_shape: 512x512x3 output_shape: 128x128x32, 64x64x36, 64x64x288, 64x64x729, 32x32x36, 32x32x288, 32x32x729, 16x16x36, 16x16x288, 16x16x729, 8x8x36, 8x8x288, 8x8x729, 4x4x36, 4x4x288, 4x4x729 - operations: 62.67G + operations: 125.34G parameters: 30.09M framework: pytorch training_data: coco instances train2017 diff --git a/hailo_model_zoo/cfg/networks/yolact_regnetx_600mf_d2s_31classes.yaml b/hailo_model_zoo/cfg/networks/yolact_regnetx_600mf_d2s_31classes.yaml index d944201e..ed5b90ad 100644 --- a/hailo_model_zoo/cfg/networks/yolact_regnetx_600mf_d2s_31classes.yaml +++ b/hailo_model_zoo/cfg/networks/yolact_regnetx_600mf_d2s_31classes.yaml @@ -371,7 +371,7 @@ info: input_shape: 512x512x3 output_shape: 128x128x32, 64x64x36, 64x64x288, 64x64x279, 32x32x36, 32x32x288, 32x32x279, 16x16x36, 16x16x288, 16x16x279, 8x8x36, 8x8x288, 8x8x279, 4x4x36, 4x4x288, 4x4x279 - operations: 51.62G + operations: 103.24G parameters: 22.14M framework: pytorch training_data: d2s augemented train diff --git a/hailo_model_zoo/cfg/networks/yolact_regnetx_800mf.yaml b/hailo_model_zoo/cfg/networks/yolact_regnetx_800mf.yaml index d141ac8f..b4b1c69b 100644 --- a/hailo_model_zoo/cfg/networks/yolact_regnetx_800mf.yaml +++ b/hailo_model_zoo/cfg/networks/yolact_regnetx_800mf.yaml @@ -34,7 +34,7 @@ info: input_shape: 512x512x3 output_shape: 128x128x32, 64x64x36, 64x64x288, 64x64x729, 32x32x36, 32x32x288, 32x32x729, 16x16x36, 16x16x288, 16x16x729, 8x8x36, 8x8x288, 8x8x729, 4x4x36, 4x4x288, 4x4x729 - operations: 58.375G + operations: 116.75G parameters: 28.3M framework: pytorch training_data: coco instances train2017 diff --git a/hailo_model_zoo/cfg/networks/yolact_regnetx_800mf_20classes.yaml b/hailo_model_zoo/cfg/networks/yolact_regnetx_800mf_20classes.yaml index b22ce497..ff91b440 100644 --- a/hailo_model_zoo/cfg/networks/yolact_regnetx_800mf_20classes.yaml +++ b/hailo_model_zoo/cfg/networks/yolact_regnetx_800mf_20classes.yaml @@ -452,7 +452,7 @@ info: input_shape: 512x512x3 output_shape: 128x128x32, 64x64x36, 64x64x288, 64x64x180, 32x32x36, 32x32x288, 32x32x180, 16x16x36, 16x16x288, 16x16x180, 8x8x36, 8x8x288, 8x8x180, 4x4x36, 4x4x288, 4x4x180 - operations: 51.47G + operations: 102.94G parameters: 21.97M framework: pytorch training_data: coco instances train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov3.yaml b/hailo_model_zoo/cfg/networks/yolov3.yaml index ae0af89a..f9c33bf8 100644 --- a/hailo_model_zoo/cfg/networks/yolov3.yaml +++ b/hailo_model_zoo/cfg/networks/yolov3.yaml @@ -45,7 +45,7 @@ info: task: object detection input_shape: 608x608x3 output_shape: 19x19x255, 38x38x255, 76x76x255 - operations: 79.17G + operations: 158.34G parameters: 68.79M framework: darknet training_data: coco2017 diff --git a/hailo_model_zoo/cfg/networks/yolov3_416.yaml b/hailo_model_zoo/cfg/networks/yolov3_416.yaml index 3ef93c9a..0b37c7fa 100644 --- a/hailo_model_zoo/cfg/networks/yolov3_416.yaml +++ b/hailo_model_zoo/cfg/networks/yolov3_416.yaml @@ -45,7 +45,7 @@ info: task: object detection input_shape: 416x416x3 output_shape: 13x13x255, 26x26x255, 52x52x255 - operations: 32.97G + operations: 65.94G parameters: 61.92M framework: darknet training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov3_gluon.yaml b/hailo_model_zoo/cfg/networks/yolov3_gluon.yaml index 452cacab..ea2578c8 100644 --- a/hailo_model_zoo/cfg/networks/yolov3_gluon.yaml +++ b/hailo_model_zoo/cfg/networks/yolov3_gluon.yaml @@ -57,7 +57,7 @@ info: task: object detection input_shape: 608x608x3 output_shape: 19x19x255, 38x38x255, 76x76x255 - operations: 79.17G + operations: 140.69G parameters: 68.79M framework: gluoncv training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov3_gluon_416.yaml b/hailo_model_zoo/cfg/networks/yolov3_gluon_416.yaml index 13c7a683..32a26ff0 100644 --- a/hailo_model_zoo/cfg/networks/yolov3_gluon_416.yaml +++ b/hailo_model_zoo/cfg/networks/yolov3_gluon_416.yaml @@ -57,7 +57,7 @@ info: task: object detection input_shape: 416x416x3 output_shape: 13x13x255, 26x26x255, 52x52x255 - operations: 32.97G + operations: 65.94G parameters: 61.92M framework: gluoncv training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov4_leaky.yaml b/hailo_model_zoo/cfg/networks/yolov4_leaky.yaml index c3df808a..ecec0b60 100644 --- a/hailo_model_zoo/cfg/networks/yolov4_leaky.yaml +++ b/hailo_model_zoo/cfg/networks/yolov4_leaky.yaml @@ -62,7 +62,7 @@ info: input_shape: 512x512x3 output_shape: 16x16x6, 16x16x6, 16x16x3, 16x16x240, 32x32x6, 32x32x6, 32x32x3, 32x32x240, 64x64x6, 64x64x6, 64x64x3, 64x64x240 - operations: 45.60G + operations: 91.04G parameters: 64.33M framework: darknet training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5l.yaml b/hailo_model_zoo/cfg/networks/yolov5l.yaml index 6aa62840..8579f529 100644 --- a/hailo_model_zoo/cfg/networks/yolov5l.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5l.yaml @@ -1,5 +1,11 @@ base: - base/yolov5.yaml +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5l_spp/pretrained/2023-04-25/yolov5l_nms_config.json + meta_arch: yolo + hpp: true quantization: calib_set: - models_files/coco/2021-06-18/coco_calib2017.tfrecord @@ -7,8 +13,8 @@ network: network_name: yolov5l paths: network_path: - - models_files/yolov5/yolov5l_spp/2021-02-04/yolov5l.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5l_spp/pretrained/2022-02-03/yolov5l.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5l_spp/pretrained/2023-04-25/yolov5l.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5l_spp/pretrained/2023-04-25/yolov5l.zip alls_script: yolov5l.alls parser: nodes: @@ -20,7 +26,7 @@ info: task: object detection input_shape: 640x640x3 output_shape: 20x20x255, 40x40x255, 80x80x255 - operations: 60.78G + operations: 121.56G parameters: 48.54M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5l_seg.yaml b/hailo_model_zoo/cfg/networks/yolov5l_seg.yaml index a8526ad3..3fdeb612 100644 --- a/hailo_model_zoo/cfg/networks/yolov5l_seg.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5l_seg.yaml @@ -18,7 +18,7 @@ info: task: instance segmentation input_shape: 640x640x3 output_shape: 160x160x32, 20x20x351, 40x40x351, 80x80x351 - operations: 73.94G + operations: 147.88G parameters: 47.89M framework: pytorch training_data: coco instances train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5m.yaml b/hailo_model_zoo/cfg/networks/yolov5m.yaml index 310bc6f1..7ea6886d 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m.yaml @@ -1,5 +1,11 @@ base: - base/yolov5.yaml +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2023-04-25/yolov5m_nms_config.json + meta_arch: yolo + hpp: true quantization: calib_set: - models_files/coco/2021-06-18/coco_calib2017.tfrecord @@ -8,8 +14,8 @@ network: paths: alls_script: yolov5m.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2022-01-02/yolov5m.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2022-01-02/yolov5m.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2023-04-25/yolov5m.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2023-04-25/yolov5m.zip parser: nodes: - images @@ -20,7 +26,7 @@ info: task: object detection input_shape: 640x640x3 output_shape: 20x20x255, 40x40x255, 80x80x255 - operations: 26.14G + operations: 52.28G parameters: 21.78M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5m6_6.1.yaml b/hailo_model_zoo/cfg/networks/yolov5m6_6.1.yaml index bc3ee461..b30e466f 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m6_6.1.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m6_6.1.yaml @@ -10,42 +10,16 @@ preprocessing: - 1280 - 3 postprocessing: - anchors: - strides: - - 8 - - 16 - - 32 - - 64 - sizes: - - - 19 - - 27 - - 44 - - 40 - - 38 - - 94 - - - 96 - - 68 - - 86 - - 152 - - 180 - - 137 - - - 140 - - 301 - - 303 - - 264 - - 238 - - 542 - - - 436 - - 615 - - 739 - - 380 - - 925 - - 792 + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5m6_6.1/pretrained/2023-04-25/yolov5m6_nms_config.json + meta_arch: yolo + hpp: true paths: alls_script: yolov5m6_6.1.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m6_6.1/pretrained/2022-04-12/yolov5m6.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m6_6.1/pretrained/2022-04-12/yolov5m6.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m6_6.1/pretrained/2023-04-25/yolov5m6.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m6_6.1/pretrained/2023-04-25/yolov5m6.zip parser: nodes: - images @@ -57,7 +31,7 @@ info: task: object detection input_shape: 1280x1280x3 output_shape: 20x20x255, 40x40x255, 80x80x255, 160x160x255 - operations: 100.02G + operations: 200.04G parameters: 35.70M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5m_6.1.yaml b/hailo_model_zoo/cfg/networks/yolov5m_6.1.yaml index d3996c39..d01430ab 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m_6.1.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m_6.1.yaml @@ -5,19 +5,25 @@ network: paths: alls_script: yolov5m_6.1.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_6.1/pretrained/2022-03-24/yolov5m_6.1.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m_6.1/pretrained/2022-03-24/yolov5m_6.1.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_6.1/pretrained/2023-04-25/yolov5m_6.1.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m_6.1/pretrained/2023-04-25/yolov5m_6.1.zip parser: nodes: - images - - Conv_371 - Conv_321 - Conv_271 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_6.1/pretrained/2023-04-25/yolov5m_6.1_nms_config.json + meta_arch: yolo + hpp: true info: task: object detection input_shape: 640x640x3 output_shape: 20x20x255, 40x40x255, 80x80x255, - operations: 24.48G + operations: 48.96G parameters: 21.17M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5m_hpp.yaml b/hailo_model_zoo/cfg/networks/yolov5m_hpp.yaml deleted file mode 100644 index 7aff30e7..00000000 --- a/hailo_model_zoo/cfg/networks/yolov5m_hpp.yaml +++ /dev/null @@ -1,37 +0,0 @@ -base: -- base/yolov5.yaml -postprocessing: - device_pre_post_layers: - nms: true - postprocess_config_json: models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2022-01-02/yolov5m_nms_config.json - meta_arch: yolo - hpp: true -quantization: - calib_set: - - models_files/coco/2021-06-18/coco_calib2017.tfrecord -network: - network_name: yolov5m_hpp -paths: - alls_script: yolov5m_hpp.alls - network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2022-01-02/yolov5m.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m_spp/pretrained/2022-01-02/yolov5m.zip -parser: - nodes: - - images - - - Conv_289 - - Conv_273 - - Conv_257 -info: - task: object detection - input_shape: 640x640x3 - output_shape: 20x20x255, 40x40x255, 80x80x255 - operations: 26.14G - parameters: 21.78M - framework: pytorch - training_data: coco train2017 - validation_data: coco val2017 - eval_metric: mAP - full_precision_result: 42.59 - source: https://github.com/ultralytics/yolov5/releases/tag/v2.0 - license_url: https://github.com/ultralytics/yolov5/blob/master/LICENSE diff --git a/hailo_model_zoo/cfg/networks/yolov5m_seg.yaml b/hailo_model_zoo/cfg/networks/yolov5m_seg.yaml index 7f364856..65946c25 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m_seg.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m_seg.yaml @@ -18,7 +18,7 @@ info: task: instance segmentation input_shape: 640x640x3 output_shape: 160x160x32, 20x20x351, 40x40x351, 80x80x351 - operations: 35.47G + operations: 70.94G parameters: 32.60M framework: pytorch training_data: coco instances train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5m_vehicles.yaml b/hailo_model_zoo/cfg/networks/yolov5m_vehicles.yaml index a0d80c9d..c65e5aa7 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m_vehicles.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m_vehicles.yaml @@ -13,8 +13,8 @@ network: paths: alls_script: yolov5m_vehicles.alls network_path: - - models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2022-02-23/yolov5m_vehicles.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2022-02-23/yolov5m_vehicles.zip + - models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles.zip parser: nodes: - images @@ -27,11 +27,17 @@ evaluation: dataset_name: vehicle_detection data_set: null validation_data_set: null +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json + meta_arch: yolo + hpp: true info: task: pipeline input_shape: 1080x1920x3 output_shape: 20x20x18, 40x40x18, 80x80x18 - operations: 25.63G + operations: 51.19G parameters: 21.47M framework: pytorch eval_metric: mAP diff --git a/hailo_model_zoo/cfg/networks/yolov5m_vehicles_nv12.yaml b/hailo_model_zoo/cfg/networks/yolov5m_vehicles_nv12.yaml new file mode 100644 index 00000000..4e5c1e21 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov5m_vehicles_nv12.yaml @@ -0,0 +1,46 @@ +base: +- base/yolov5.yaml +quantization: + calib_set: null +hn_editor: + yuv2rgb: true + nv12: true + input_resize: + enabled: true + input_shape: + - 1080 + - 1920 +network: + network_name: yolov5m_vehicles_nv12 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json + meta_arch: yolo + hpp: true +paths: + alls_script: yolov5m_vehicles_nv12.alls + network_path: + - models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles.zip +parser: + nodes: + - images + - - Conv_289 + - Conv_273 + - Conv_257 +evaluation: + labels_offset: 0 + classes: 1 + dataset_name: vehicle_detection + data_set: null + validation_data_set: null +info: + task: pipeline + input_shape: 540x1920x3 + output_shape: 20x20x18, 40x40x18, 80x80x18 + operations: 51.19G + parameters: 21.47M + framework: pytorch + eval_metric: mAP + full_precision_result: 46.059 diff --git a/hailo_model_zoo/cfg/networks/yolov5m_vehicles_yuy2.yaml b/hailo_model_zoo/cfg/networks/yolov5m_vehicles_yuy2.yaml index 753b775f..ccd74378 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m_vehicles_yuy2.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m_vehicles_yuy2.yaml @@ -12,11 +12,17 @@ hn_editor: - 1920 network: network_name: yolov5m_vehicles_yuy2 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles_nms_config.json + meta_arch: yolo + hpp: true paths: alls_script: yolov5m_vehicles_yuy2.alls network_path: - - models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2022-02-23/yolov5m_vehicles.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2022-02-23/yolov5m_vehicles.zip + - models_files/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/HailoNets/LPR/vehicle_detector/yolov5m_vehicles/2023-04-25/yolov5m_vehicles.zip parser: nodes: - images @@ -33,7 +39,7 @@ info: task: pipeline input_shape: 1080x1920x2 output_shape: 20x20x18, 40x40x18, 80x80x18 - operations: 25.63G + operations: 51.19G parameters: 21.47M framework: pytorch eval_metric: mAP diff --git a/hailo_model_zoo/cfg/networks/yolov5m_wo_spp.yaml b/hailo_model_zoo/cfg/networks/yolov5m_wo_spp.yaml index 20cf3da5..a6c7fd14 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m_wo_spp.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m_wo_spp.yaml @@ -1,5 +1,5 @@ base: -- base/yolo.yaml +- base/yolov5.yaml quantization: calib_set: - models_files/coco/2021-06-18/coco_calib2017.tfrecord @@ -8,18 +8,24 @@ network: paths: alls_script: yolov5m_wo_spp.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2022-04-19/yolov5m_wo_spp.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2022-04-19/yolov5m_wo_spp.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_wo_spp.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_wo_spp.zip parser: nodes: - images - - Conv_283 - Conv_267 - Conv_251 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_nms_config.json + meta_arch: yolo + hpp: true info: input_shape: 640x640x3 output_shape: 20x20x255, 40x40x255, 80x80x255 - operations: 26.49G + operations: 52.98G parameters: 22.67M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p.yaml b/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p.yaml index 3fe257ef..4391ecfa 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p.yaml @@ -5,19 +5,25 @@ network: paths: alls_script: yolov5m_wo_spp_60p.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2022-04-19/yolov5m_wo_spp.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2022-04-19/yolov5m_wo_spp.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_wo_spp.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_wo_spp.zip parser: nodes: - images - - Conv_283 - Conv_267 - Conv_251 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_nms_config.json + meta_arch: yolo + hpp: true info: task: object detection input_shape: 640x640x3 output_shape: 20x20x255, 40x40x255, 80x80x255 - operations: 26.49G + operations: 41.67G parameters: 22.67M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p_nv12_fhd.yaml b/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p_nv12_fhd.yaml new file mode 100644 index 00000000..ce902284 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p_nv12_fhd.yaml @@ -0,0 +1,36 @@ +base: +- base/yolov5.yaml +network: + network_name: yolov5m_wo_spp_60p_nv12_fhd +paths: + alls_script: yolov5m_wo_spp_60p_nv12_fhd.alls + network_path: + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_wo_spp.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2023-04-25/yolov5m_wo_spp.zip +parser: + nodes: + - images + - - Conv_283 + - Conv_267 + - Conv_251 +hn_editor: + yuv2rgb: true + nv12: true + input_resize: + enabled: true + input_shape: + - 1080 + - 1920 +info: + task: pipeline_hailo15 + input_shape: 540x1920x3 + output_shape: 20x20x255, 40x40x255, 80x80x255 + operations: 52.98G + parameters: 22.67M + framework: pytorch + training_data: coco train2017 + validation_data: coco val2017 + eval_metric: mAP + full_precision_result: 42.65 + source: https://github.com/ultralytics/yolov5/releases/tag/v2.0 + license_url: https://github.com/ultralytics/yolov5/blob/master/LICENSE diff --git a/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_yuy2.yaml b/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_yuy2.yaml index 71a2011d..85e2bad3 100644 --- a/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_yuy2.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_yuy2.yaml @@ -16,5 +16,5 @@ info: task: pipeline input_shape: 720x1280x2 output_shape: 20x20x255, 40x40x255, 80x80x255 - operations: 26.50G + operations: 53G parameters: 22.67M diff --git a/hailo_model_zoo/cfg/networks/yolov5n6_6.1.yaml b/hailo_model_zoo/cfg/networks/yolov5n6_6.1.yaml index 338acb38..f70220ca 100644 --- a/hailo_model_zoo/cfg/networks/yolov5n6_6.1.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5n6_6.1.yaml @@ -8,42 +8,16 @@ preprocessing: - 1280 - 3 postprocessing: - anchors: - strides: - - 8 - - 16 - - 32 - - 64 - sizes: - - - 19 - - 27 - - 44 - - 40 - - 38 - - 94 - - - 96 - - 68 - - 86 - - 152 - - 180 - - 137 - - - 140 - - 301 - - 303 - - 264 - - 238 - - 542 - - - 436 - - 615 - - 739 - - 380 - - 925 - - 792 + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5n6_6.1/pretrained/2023-04-25/yolov5n6_nms_config.json + meta_arch: yolo + hpp: true paths: alls_script: yolov5n6_6.1.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5n6_6.1/pretrained/2022-04-12/yolov5n6.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5n6_6.1/pretrained/2022-04-12/yolov5n6.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5n6_6.1/pretrained/2023-04-25/yolov5n6.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5n6_6.1/pretrained/2023-04-25/yolov5n6.zip parser: nodes: - images @@ -55,7 +29,7 @@ info: task: object detection input_shape: 1280x1280x3 output_shape: 20x20x255, 40x40x255, 80x80x255, 160x160x255 - operations: 9.17G + operations: 18.34G parameters: 3.24M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5n_seg.yaml b/hailo_model_zoo/cfg/networks/yolov5n_seg.yaml index f243f873..10bb3e48 100644 --- a/hailo_model_zoo/cfg/networks/yolov5n_seg.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5n_seg.yaml @@ -18,7 +18,7 @@ info: task: instance segmentation input_shape: 640x640x3 output_shape: 160x160x32, 20x20x351, 40x40x351, 80x80x351 - operations: 3.55G + operations: 7.1G parameters: 1.99M framework: pytorch training_data: coco instances train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5n_seg_nv12_fhd.yaml b/hailo_model_zoo/cfg/networks/yolov5n_seg_nv12_fhd.yaml new file mode 100644 index 00000000..b3808edb --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov5n_seg_nv12_fhd.yaml @@ -0,0 +1,37 @@ +base: +- base/yolov5_seg.yaml +network: + network_name: yolov5n_seg_nv12_fhd +paths: + alls_script: yolov5n_seg_nv12_fhd.alls + network_path: + - models_files/InstanceSegmentation/coco/yolov5/yolov5n/pretrained/2022-10-30/yolov5n-seg.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/InstanceSegmentation/coco/yolov5/yolov5n/pretrained/2022-10-30/yolov5n-seg.zip +parser: + nodes: + - images + - - output1 + - Conv_289 + - Conv_249 + - Conv_209 +hn_editor: + yuv2rgb: true + nv12: true + input_resize: + enabled: true + input_shape: + - 1080 + - 1920 +info: + task: pipeline_hailo15 + input_shape: 540x1920x3 + output_shape: 160x160x32, 20x20x351, 40x40x351, 80x80x351 + operations: 7.1G + parameters: 1.99M + framework: pytorch + training_data: coco instances train2017 + validation_data: coco instances val2017 + eval_metric: mAP + full_precision_result: 23.385 + source: https://github.com/ultralytics/yolov5 + license_url: https://github.com/ultralytics/yolov5/blob/master/LICENSE diff --git a/hailo_model_zoo/cfg/networks/yolov5s.yaml b/hailo_model_zoo/cfg/networks/yolov5s.yaml index a2f2a993..dc7f1c39 100644 --- a/hailo_model_zoo/cfg/networks/yolov5s.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5s.yaml @@ -5,19 +5,25 @@ network: paths: alls_script: yolov5s.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_spp/pretrained/2022-01-02/yolov5s.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5s_spp/pretrained/2022-01-02/yolov5s.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_spp/pretrained/2023-04-25/yolov5s.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5s_spp/pretrained/2023-04-25/yolov5s.zip parser: nodes: - images - - Conv_234 - Conv_218 - Conv_202 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_spp/pretrained/2023-04-25/yolov5s_nms_config.json + meta_arch: yolo + hpp: true info: task: object detection input_shape: 640x640x3 output_shape: 80x80x255, 40x40x255, 20x20x255 - operations: 8.72G + operations: 17.44G parameters: 7.46M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5s6_6.1.yaml b/hailo_model_zoo/cfg/networks/yolov5s6_6.1.yaml index 03ce244b..b1631003 100644 --- a/hailo_model_zoo/cfg/networks/yolov5s6_6.1.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5s6_6.1.yaml @@ -8,42 +8,16 @@ preprocessing: - 1280 - 3 postprocessing: - anchors: - strides: - - 8 - - 16 - - 32 - - 64 - sizes: - - - 19 - - 27 - - 44 - - 40 - - 38 - - 94 - - - 96 - - 68 - - 86 - - 152 - - 180 - - 137 - - - 140 - - 301 - - 303 - - 264 - - 238 - - 542 - - - 436 - - 615 - - 739 - - 380 - - 925 - - 792 + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5s6_6.1/pretrained/2023-04-25/yolov5s6_nms_config.json + meta_arch: yolo + hpp: true paths: alls_script: yolov5s6_6.1.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5s6_6.1/pretrained/2022-04-12/yolov5s6.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5s6_6.1/pretrained/2022-04-12/yolov5s6.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5s6_6.1/pretrained/2023-04-25/yolov5s6.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5s6_6.1/pretrained/2023-04-25/yolov5s6.zip parser: nodes: - images @@ -55,7 +29,7 @@ info: task: object detection input_shape: 1280x1280x3 output_shape: 20x20x255, 40x40x255, 80x80x255, 160x160x255 - operations: 33.70G + operations: 67.4G parameters: 12.61M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5s_c3tr.yaml b/hailo_model_zoo/cfg/networks/yolov5s_c3tr.yaml index 8d47ad4a..cea59f59 100644 --- a/hailo_model_zoo/cfg/networks/yolov5s_c3tr.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5s_c3tr.yaml @@ -8,19 +8,25 @@ network: paths: alls_script: yolov5s_c3tr.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_c3tr/pretrained/2023-02-07/yolov5s_c3tr_simp.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5s_c3tr/pretrained/2023-02-07/yolov5s_c3tr.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_c3tr/pretrained/2023-04-25/yolov5s_c3tr_simp.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5s_c3tr/pretrained/2023-04-25/yolov5s_c3tr.zip parser: nodes: - images - - Conv_383 - Conv_332 - Conv_281 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5s_c3tr/pretrained/2023-04-25/yolov5s_c3tr_nms_config.json + meta_arch: yolo + hpp: true info: task: object detection input_shape: 640x640x3 output_shape: 20x20x255, 40x40x255, 80x80x255 - operations: 8.51G + operations: 17.02G parameters: 10.29M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5s_personface.yaml b/hailo_model_zoo/cfg/networks/yolov5s_personface.yaml index 0b4894b4..6b386cdf 100644 --- a/hailo_model_zoo/cfg/networks/yolov5s_personface.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5s_personface.yaml @@ -5,8 +5,8 @@ network: paths: alls_script: yolov5s_personface.alls network_path: - - models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2022-04-01/yolov5s_personface.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/HailoNets/MCPReID/personface_detector/yolov5s_personface/2022-04-01/yolov5s_personface.zip + - models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.zip parser: nodes: - images @@ -16,7 +16,11 @@ parser: preprocessing: max_pad: 500 postprocessing: - nms_iou_thresh: 0.65 + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.json + meta_arch: yolo + hpp: true quantization: calib_set: null evaluation: @@ -29,7 +33,7 @@ info: task: pipeline input_shape: 640x640x3 output_shape: 80x80x21, 40x40x21, 20x20x21 - operations: 8.38G + operations: 16.71G parameters: 7.25M framework: pytorch training_data: Hailo internal diff --git a/hailo_model_zoo/cfg/networks/yolov5s_personface_nv12.yaml b/hailo_model_zoo/cfg/networks/yolov5s_personface_nv12.yaml new file mode 100644 index 00000000..0c290291 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov5s_personface_nv12.yaml @@ -0,0 +1,13 @@ +base: +- base/yolov5.yaml +- networks/yolov5s_personface.yaml +hn_editor: + yuv2rgb: true + nv12: true +network: + network_name: yolov5s_personface_nv12 +paths: + alls_script: yolov5s_personface_nv12.alls +info: + task: pipeline + input_shape: 320x640x3 diff --git a/hailo_model_zoo/cfg/networks/yolov5s_personface_nv12_fhd.yaml b/hailo_model_zoo/cfg/networks/yolov5s_personface_nv12_fhd.yaml new file mode 100644 index 00000000..e1762bc1 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov5s_personface_nv12_fhd.yaml @@ -0,0 +1,46 @@ +base: +- base/yolov5.yaml +network: + network_name: yolov5s_personface_nv12_fhd +paths: + alls_script: yolov5s_personface_nv12_fhd.alls + network_path: + - models_files/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/HailoNets/MCPReID/personface_detector/yolov5s_personface/2023-04-25/yolov5s_personface.zip +parser: + nodes: + - images + - - Conv_234 + - Conv_218 + - Conv_202 +preprocessing: + max_pad: 500 +quantization: + calib_set: null +evaluation: + labels_offset: 1 + classes: 2 + dataset_name: personface_detection + data_set: null + validation_data_set: null +hn_editor: + yuv2rgb: true + nv12: true + input_resize: + enabled: true + input_shape: + - 1080 + - 1920 +info: + task: pipeline_hailo15 + input_shape: 540x1920x3 + output_shape: 80x80x21, 40x40x21, 20x20x21 + operations: 16.76G + parameters: 7.25M + framework: pytorch + training_data: Hailo internal + validation_data: Hailo internal + eval_metric: mAP + full_precision_result: 47.189 + source: https://github.com/ultralytics/yolov5/releases/tag/v2.0 + license_url: https://github.com/ultralytics/yolov5/blob/master/LICENSE diff --git a/hailo_model_zoo/cfg/networks/yolov5s_personface_rgbx.yaml b/hailo_model_zoo/cfg/networks/yolov5s_personface_rgbx.yaml new file mode 100644 index 00000000..ee15ac75 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov5s_personface_rgbx.yaml @@ -0,0 +1,12 @@ +base: +- base/yolov5.yaml +- networks/yolov5s_personface.yaml +network: + network_name: yolov5s_personface_rgbx +paths: + alls_script: yolov5s_personface_rgbx.alls +hn_editor: + rgbx: true +info: + task: pipeline + input_shape: 640x640x4 diff --git a/hailo_model_zoo/cfg/networks/yolov5s_seg.yaml b/hailo_model_zoo/cfg/networks/yolov5s_seg.yaml index 8c266940..216c006d 100644 --- a/hailo_model_zoo/cfg/networks/yolov5s_seg.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5s_seg.yaml @@ -18,7 +18,7 @@ info: task: instance segmentation input_shape: 640x640x3 output_shape: 160x160x32, 20x20x351, 40x40x351, 80x80x351 - operations: 13.21G + operations: 26.42G parameters: 7.61M framework: pytorch training_data: coco instances train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5xs_wo_spp.yaml b/hailo_model_zoo/cfg/networks/yolov5xs_wo_spp.yaml index 8117754e..1a3c3696 100644 --- a/hailo_model_zoo/cfg/networks/yolov5xs_wo_spp.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5xs_wo_spp.yaml @@ -1,5 +1,5 @@ base: -- base/yolo.yaml +- base/yolov5.yaml preprocessing: input_shape: - 512 @@ -9,8 +9,8 @@ network: network_name: yolov5xs_wo_spp paths: network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2021-07-11/yolov5s512.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2021-07-11/yolov5xs.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2023-04-25/yolov5s512.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2023-04-25/yolov5xs.zip alls_script: yolov5xs_wo_spp.alls parser: nodes: @@ -18,11 +18,17 @@ parser: - - Conv_252 - Conv_235 - Conv_218 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2023-04-25/yolov5xs_nms_config.json + meta_arch: yolo + hpp: true info: task: object detection input_shape: 512x512x3 output_shape: 16x16x255, 32x32x255, 64x64x255 - operations: 5.68G + operations: 11.36G parameters: 7.85M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov5xs_wo_spp_nms.yaml b/hailo_model_zoo/cfg/networks/yolov5xs_wo_spp_nms_core.yaml similarity index 85% rename from hailo_model_zoo/cfg/networks/yolov5xs_wo_spp_nms.yaml rename to hailo_model_zoo/cfg/networks/yolov5xs_wo_spp_nms_core.yaml index 0021f57f..da9ade61 100644 --- a/hailo_model_zoo/cfg/networks/yolov5xs_wo_spp_nms.yaml +++ b/hailo_model_zoo/cfg/networks/yolov5xs_wo_spp_nms_core.yaml @@ -6,12 +6,12 @@ preprocessing: - 512 - 3 network: - network_name: yolov5xs_wo_spp_nms + network_name: yolov5xs_wo_spp_nms_core paths: network_path: - models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2022-05-10/yolov5s512.onnx url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2022-05-10/yolov5xs_wo_spp_nms.zip - alls_script: yolov5xs_wo_spp_nms.alls + alls_script: yolov5xs_wo_spp_nms_core.alls parser: nodes: - null @@ -21,13 +21,13 @@ parser: postprocessing: device_pre_post_layers: nms: true - postprocess_config_json: models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2022-05-10/yolov5xs_wo_spp_nms_config.json + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov5xs/pretrained/2022-05-10/yolov5xs_wo_spp_nms_config.json meta_arch: yolo info: task: object detection input_shape: 512x512x3 output_shape: 16x16x255, 32x32x255, 64x64x255 - operations: 5.68G + operations: 11.36G parameters: 7.85M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov6n.yaml b/hailo_model_zoo/cfg/networks/yolov6n.yaml index d65b3c77..01d90a39 100644 --- a/hailo_model_zoo/cfg/networks/yolov6n.yaml +++ b/hailo_model_zoo/cfg/networks/yolov6n.yaml @@ -5,8 +5,8 @@ network: paths: alls_script: yolov6n.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov6n/pretrained/2022-06-28/yolov6n.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov6n/pretrained/2022-06-28/yolov6n.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov6n/pretrained/2023-05-31/yolov6n.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov6n/pretrained/2023-05-31/yolov6n.zip parser: nodes: - null @@ -35,7 +35,7 @@ info: input_shape: 640x640x3 output_shape: 80x80x4, 80x80x1, 80x80x80, 40x40x4, 40x40x1, 40x40x80, 20x20x4, 20x20x1, 20x20x80 - operations: 5.57G + operations: 4.65G parameters: 4.32M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov6n_0.2.1.yaml b/hailo_model_zoo/cfg/networks/yolov6n_0.2.1.yaml new file mode 100644 index 00000000..c9940c48 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov6n_0.2.1.yaml @@ -0,0 +1,31 @@ +base: +- base/yolov6.yaml +network: + network_name: yolov6n_0.2.1 +paths: + alls_script: yolov6n_0.2.1.alls + network_path: + - models_files/ObjectDetection/Detection-COCO/yolo/yolov6n_0.2.1/pretrained/2023-04-17/yolov6n_0.2.1.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov6n_0.2.1/pretrained/2023-04-17/yolov6n_0.2.1.zip +parser: + nodes: + - null + - - Conv_133 + - Sigmoid_134 + - Conv_147 + - Sigmoid_148 + - Conv_161 + - Sigmoid_162 +info: + task: object detection + input_shape: 640x640x3 + output_shape: 80x80x4, 80x80x80, 40x40x4, 40x40x80, 20x20x4, 20x20x80 + operations: 11.06G + parameters: 4.33M + framework: pytorch + training_data: coco train2017 + validation_data: coco val2017 + eval_metric: mAP + source: https://github.com/meituan/YOLOv6/releases/tag/0.2.1 + license_url: https://github.com/meituan/YOLOv6/blob/main/LICENSE + full_precision_result: 35.2 diff --git a/hailo_model_zoo/cfg/networks/yolov7.yaml b/hailo_model_zoo/cfg/networks/yolov7.yaml index 9506740e..7162a268 100644 --- a/hailo_model_zoo/cfg/networks/yolov7.yaml +++ b/hailo_model_zoo/cfg/networks/yolov7.yaml @@ -1,39 +1,19 @@ base: -- base/yolo.yaml +- base/yolov5.yaml inference: emulator_batch_size: 4 postprocessing: - meta_arch: yolo_v5 - anchors: - strides: - - 8 - - 16 - - 32 - sizes: - - - 12 - - 16 - - 19 - - 36 - - 40 - - 28 - - - 36 - - 75 - - 76 - - 55 - - 72 - - 146 - - - 142 - - 110 - - 192 - - 243 - - 459 - - 401 + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov7/pretrained/2023-04-25/yolov7_nms_config.json + meta_arch: yolo + hpp: true network: network_name: yolov7 paths: network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov7/pretrained/2022-07-10/yolov7.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov7/pretrained/2022-07-10/yolov7.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov7/pretrained/2023-04-25/yolov7.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov7/pretrained/2023-04-25/yolov7.zip alls_script: yolov7.alls parser: nodes: @@ -45,12 +25,12 @@ info: task: object detection input_shape: 640x640x3 output_shape: 80x80x255, 40x40x255, 20x20x255 - operations: 52.34G + operations: 104.68G parameters: 36.91M framework: pytorch training_data: coco train2017 validation_data: coco val2017 eval_metric: mAP - full_precision_result: 49.719 + full_precision_result: 50.596 source: https://github.com/WongKinYiu/yolov7 license_url: https://github.com/WongKinYiu/yolov7/blob/main/LICENSE.md diff --git a/hailo_model_zoo/cfg/networks/yolov7_tiny.yaml b/hailo_model_zoo/cfg/networks/yolov7_tiny.yaml index f3b53ed5..ab9f826e 100644 --- a/hailo_model_zoo/cfg/networks/yolov7_tiny.yaml +++ b/hailo_model_zoo/cfg/networks/yolov7_tiny.yaml @@ -1,39 +1,19 @@ base: -- base/yolo.yaml +- base/yolov5.yaml inference: emulator_batch_size: 4 postprocessing: - meta_arch: yolo_v5 - anchors: - strides: - - 8 - - 16 - - 32 - sizes: - - - 12 - - 16 - - 19 - - 36 - - 40 - - 28 - - - 36 - - 75 - - 76 - - 55 - - 72 - - 146 - - - 142 - - 110 - - 192 - - 243 - - 459 - - 401 + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov7_tiny/pretrained/2023-04-25/yolov7_tiny_nms_config.json + meta_arch: yolo + hpp: true network: network_name: yolov7_tiny paths: network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov7_tiny/pretrained/2022-07-10/yolov7_tiny.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov7_tiny/pretrained/2022-07-10/yolov7_tiny.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov7_tiny/pretrained/2023-04-25/yolov7_tiny.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov7_tiny/pretrained/2023-04-25/yolov7_tiny.zip alls_script: yolov7_tiny.alls parser: nodes: @@ -45,12 +25,12 @@ info: task: object detection input_shape: 640x640x3 output_shape: 80x80x255, 40x40x255, 20x20x255 - operations: 6.87G + operations: 13.74G parameters: 6.22M framework: pytorch training_data: coco train2017 validation_data: coco val2017 eval_metric: mAP - full_precision_result: 36.491 + full_precision_result: 37.066 source: https://github.com/WongKinYiu/yolov7 license_url: https://github.com/WongKinYiu/yolov7/blob/main/LICENSE.md diff --git a/hailo_model_zoo/cfg/networks/yolov7e6.yaml b/hailo_model_zoo/cfg/networks/yolov7e6.yaml index 8dc6ecb4..16b0abd1 100644 --- a/hailo_model_zoo/cfg/networks/yolov7e6.yaml +++ b/hailo_model_zoo/cfg/networks/yolov7e6.yaml @@ -10,42 +10,16 @@ preprocessing: - 1280 - 3 postprocessing: - anchors: - strides: - - 8 - - 16 - - 32 - - 64 - sizes: - - - 19 - - 27 - - 44 - - 40 - - 38 - - 94 - - - 96 - - 68 - - 86 - - 152 - - 180 - - 137 - - - 140 - - 301 - - 303 - - 264 - - 238 - - 542 - - - 436 - - 615 - - 739 - - 380 - - 925 - - 792 + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolov7e6/pretrained/2023-04-25/yolov7e6_nms_config.json + meta_arch: yolo + hpp: true paths: alls_script: yolov7e6.alls network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolov7e6/pretrained/2022-10-19/yolov7-e6.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov7e6/pretrained/2022-10-19/yolov7-e6.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolov7e6/pretrained/2023-04-25/yolov7-e6.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov7e6/pretrained/2023-04-25/yolov7-e6.zip parser: nodes: - images @@ -57,7 +31,7 @@ info: task: object detection input_shape: 1280x1280x3 output_shape: 20x20x255, 40x40x255, 80x80x255, 160x160x255 - operations: 257.56G + operations: 515.12G parameters: 97.20M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov8l.yaml b/hailo_model_zoo/cfg/networks/yolov8l.yaml index 89a3d1ad..46e5c991 100644 --- a/hailo_model_zoo/cfg/networks/yolov8l.yaml +++ b/hailo_model_zoo/cfg/networks/yolov8l.yaml @@ -20,7 +20,7 @@ info: task: object detection input_shape: 640x640x3 output_shape: 80x80x80, 80X80X64, 40X40X80, 40X40X64, 20X20X80, 20X20X64 - operations: 82.65G + operations: 165.3G parameters: 43.7M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov8m.yaml b/hailo_model_zoo/cfg/networks/yolov8m.yaml index d3bce09b..01dd5a2c 100644 --- a/hailo_model_zoo/cfg/networks/yolov8m.yaml +++ b/hailo_model_zoo/cfg/networks/yolov8m.yaml @@ -20,7 +20,7 @@ info: task: object detection input_shape: 640x640x3 output_shape: 80x80x80, 80X80X64, 40X40X80, 40X40X64, 20X20X80, 20X20X64 - operations: 39.5G + operations: 78.93G parameters: 25.9M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov8m_seg.yaml b/hailo_model_zoo/cfg/networks/yolov8m_seg.yaml new file mode 100644 index 00000000..cf7ca080 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov8m_seg.yaml @@ -0,0 +1,36 @@ +base: +- base/yolov8_seg.yaml +network: + network_name: yolov8m_seg +paths: + alls_script: yolov8m_seg.alls + network_path: + - models_files/InstanceSegmentation/coco/yolov8/yolov8m/pretrained/2023-03-06/yolov8m-seg.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/InstanceSegmentation/coco/yolov8/yolov8m/pretrained/2023-03-06/yolov8m-seg.zip +parser: + nodes: + - null + - - /model.22/cv2.2/cv2.2.2/Conv + - /model.22/cv3.2/cv3.2.2/Conv + - /model.22/cv4.2/cv4.2.2/Conv + - /model.22/cv2.1/cv2.1.2/Conv + - /model.22/cv3.1/cv3.1.2/Conv + - /model.22/cv4.1/cv4.1.2/Conv + - /model.22/cv2.0/cv2.0.2/Conv + - /model.22/cv3.0/cv3.0.2/Conv + - /model.22/cv4.0/cv4.0.2/Conv + - /model.22/proto/cv3/act/Mul +info: + task: instance segmentation + input_shape: 640x640x3 + output_shape: 20x20x64, 20x20x80, 20x20x32, 40x40x64, 40x40x80, 40x40x32, 80x80x64, + 80x80x80, 80x80x32, 160x160x32 + operations: 104.6G + parameters: 27.3M + framework: pytorch + training_data: coco instances train2017 + validation_data: coco instances val2017 + eval_metric: mAP + full_precision_result: 40.6 + source: https://github.com/ultralytics/ultralytics + license_url: https://github.com/ultralytics/ultralytics/blob/main/LICENSE diff --git a/hailo_model_zoo/cfg/networks/yolov8n.yaml b/hailo_model_zoo/cfg/networks/yolov8n.yaml index fc1c9112..f67a49c7 100644 --- a/hailo_model_zoo/cfg/networks/yolov8n.yaml +++ b/hailo_model_zoo/cfg/networks/yolov8n.yaml @@ -20,7 +20,7 @@ info: task: object detection input_shape: 640x640x3 output_shape: 80x80x80, 80X80X64, 40X40X80, 40X40X64, 20X20X80, 20X20X64 - operations: 4.4G + operations: 8.8G parameters: 3.2M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov8n_seg.yaml b/hailo_model_zoo/cfg/networks/yolov8n_seg.yaml new file mode 100644 index 00000000..e57e4a12 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov8n_seg.yaml @@ -0,0 +1,36 @@ +base: +- base/yolov8_seg.yaml +network: + network_name: yolov8n_seg +paths: + alls_script: yolov8n_seg.alls + network_path: + - models_files/InstanceSegmentation/coco/yolov8/yolov8n/pretrained/2023-03-06/yolov8n-seg.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/InstanceSegmentation/coco/yolov8/yolov8n/pretrained/2023-03-06/yolov8n-seg.zip +parser: + nodes: + - null + - - /model.22/cv2.2/cv2.2.2/Conv + - /model.22/cv3.2/cv3.2.2/Conv + - /model.22/cv4.2/cv4.2.2/Conv + - /model.22/cv2.1/cv2.1.2/Conv + - /model.22/cv3.1/cv3.1.2/Conv + - /model.22/cv4.1/cv4.1.2/Conv + - /model.22/cv2.0/cv2.0.2/Conv + - /model.22/cv3.0/cv3.0.2/Conv + - /model.22/cv4.0/cv4.0.2/Conv + - /model.22/proto/cv3/act/Mul +info: + task: instance segmentation + input_shape: 640x640x3 + output_shape: 20x20x64, 20x20x80, 20x20x32, 40x40x64, 40x40x80, 40x40x32, 80x80x64, + 80x80x80, 80x80x32, 160x160x32 + operations: 12.04G + parameters: 3.4M + framework: pytorch + training_data: coco instances train2017 + validation_data: coco instances val2017 + eval_metric: mAP + full_precision_result: 30.32 + source: https://github.com/ultralytics/ultralytics + license_url: https://github.com/ultralytics/ultralytics/blob/main/LICENSE diff --git a/hailo_model_zoo/cfg/networks/yolov8s.yaml b/hailo_model_zoo/cfg/networks/yolov8s.yaml index 88abc778..0ba321f2 100644 --- a/hailo_model_zoo/cfg/networks/yolov8s.yaml +++ b/hailo_model_zoo/cfg/networks/yolov8s.yaml @@ -20,7 +20,7 @@ info: task: object detection input_shape: 640x640x3 output_shape: 80x80x80, 80X80X64, 40X40X80, 40X40X64, 20X20X80, 20X20X64 - operations: 14.3G + operations: 28.6G parameters: 11.2M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolov8s_seg.yaml b/hailo_model_zoo/cfg/networks/yolov8s_seg.yaml new file mode 100644 index 00000000..c87d2a62 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/yolov8s_seg.yaml @@ -0,0 +1,36 @@ +base: +- base/yolov8_seg.yaml +network: + network_name: yolov8s_seg +paths: + alls_script: yolov8s_seg.alls + network_path: + - models_files/InstanceSegmentation/coco/yolov8/yolov8s/pretrained/2023-03-06/yolov8s-seg.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/InstanceSegmentation/coco/yolov8/yolov8s/pretrained/2023-03-06/yolov8s-seg.zip +parser: + nodes: + - null + - - /model.22/cv2.2/cv2.2.2/Conv + - /model.22/cv3.2/cv3.2.2/Conv + - /model.22/cv4.2/cv4.2.2/Conv + - /model.22/cv2.1/cv2.1.2/Conv + - /model.22/cv3.1/cv3.1.2/Conv + - /model.22/cv4.1/cv4.1.2/Conv + - /model.22/cv2.0/cv2.0.2/Conv + - /model.22/cv3.0/cv3.0.2/Conv + - /model.22/cv4.0/cv4.0.2/Conv + - /model.22/proto/cv3/act/Mul +info: + task: instance segmentation + input_shape: 640x640x3 + output_shape: 20x20x64, 20x20x80, 20x20x32, 40x40x64, 40x40x80, 40x40x32, 80x80x64, + 80x80x80, 80x80x32, 160x160x32 + operations: 40.2G + parameters: 11.8M + framework: pytorch + training_data: coco instances train2017 + validation_data: coco instances val2017 + eval_metric: mAP + full_precision_result: 36.634 + source: https://github.com/ultralytics/ultralytics + license_url: https://github.com/ultralytics/ultralytics/blob/main/LICENSE diff --git a/hailo_model_zoo/cfg/networks/yolov8x.yaml b/hailo_model_zoo/cfg/networks/yolov8x.yaml index 17fd8971..3fa7762c 100644 --- a/hailo_model_zoo/cfg/networks/yolov8x.yaml +++ b/hailo_model_zoo/cfg/networks/yolov8x.yaml @@ -20,7 +20,7 @@ info: task: object detection input_shape: 640x640x3 output_shape: 80x80x80, 80X80X64, 40X40X80, 40X40X64, 20X20X80, 20X20X64 - operations: 129G + operations: 258G parameters: 68.2M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolox_l_leaky.yaml b/hailo_model_zoo/cfg/networks/yolox_l_leaky.yaml index f850d6b3..383f76fa 100644 --- a/hailo_model_zoo/cfg/networks/yolox_l_leaky.yaml +++ b/hailo_model_zoo/cfg/networks/yolox_l_leaky.yaml @@ -4,9 +4,9 @@ network: network_name: yolox_l_leaky paths: network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolox_l_leaky/pretrained/2021-09-23/yolox_l_leaky.onnx + - models_files/ObjectDetection/Detection-COCO/yolo/yolox_l_leaky/pretrained/2023-05-31/yolox_l_leaky.onnx alls_script: yolox_l_leaky.alls - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolox_l_leaky/pretrained/2021-09-23/yolox_l_leaky.zip + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolox_l_leaky/pretrained/2023-05-31/yolox_l_leaky.zip parser: nodes: - null @@ -19,12 +19,18 @@ parser: - Conv_339 - Sigmoid_341 - Sigmoid_342 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolox_l_leaky/pretrained/2023-05-31/nms_config_yolox_l_leaky.json + meta_arch: yolox + hpp: true info: task: object detection input_shape: 640x640x3 output_shape: 80x80x4, 80x80x1, 80x80x80, 40x40x4, 40x40x1, 40x40x80, 20x20x4, 20x20x1, 20x20x80 - operations: 77.74G + operations: 155.3G parameters: 54.17M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolox_s_leaky.yaml b/hailo_model_zoo/cfg/networks/yolox_s_leaky.yaml index 61a299f2..9ebc66fa 100644 --- a/hailo_model_zoo/cfg/networks/yolox_s_leaky.yaml +++ b/hailo_model_zoo/cfg/networks/yolox_s_leaky.yaml @@ -4,9 +4,9 @@ network: network_name: yolox_s_leaky paths: network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_leaky/pretrained/2021-09-12/yolox_s_leaky.onnx + - models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_leaky/pretrained/2023-05-31/yolox_s_leaky.onnx alls_script: yolox_s_leaky.alls - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolox_s_leaky/pretrained/2021-09-12/yolox_s_leaky.zip + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolox_s_leaky/pretrained/2023-05-31/yolox_s_leaky.zip parser: nodes: - null @@ -19,12 +19,18 @@ parser: - Conv_229 - Sigmoid_231 - Sigmoid_232 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_leaky/pretrained/2023-05-31/nms_config_yolox_s_leaky.json + meta_arch: yolox + hpp: true info: task: object detection input_shape: 640x640x3 output_shape: 80x80x4, 80x80x1, 80x80x80, 40x40x4, 40x40x1, 40x40x80, 20x20x4, 20x20x1, 20x20x80 - operations: 13.37G + operations: 26.74G parameters: 8.96M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolox_s_wide_leaky.yaml b/hailo_model_zoo/cfg/networks/yolox_s_wide_leaky.yaml index e87e5155..fa91f3d4 100644 --- a/hailo_model_zoo/cfg/networks/yolox_s_wide_leaky.yaml +++ b/hailo_model_zoo/cfg/networks/yolox_s_wide_leaky.yaml @@ -6,9 +6,9 @@ network: network_name: yolox_s_wide_leaky paths: network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_wide_leaky/pretrained/2021-09-12/yolox_s_wide_leaky.onnx + - models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_wide_leaky/pretrained/2023-05-31/yolox_s_wide_leaky.onnx alls_script: yolox_s_wide_leaky.alls - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolox_s_wide_leaky/pretrained/2021-09-12/yolox_s_wide_leaky.zip + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolox_s_wide_leaky/pretrained/2023-05-31/yolox_s_wide_leaky.zip parser: nodes: - null @@ -21,12 +21,18 @@ parser: - Conv_229 - Sigmoid_231 - Sigmoid_232 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolox_s_wide_leaky/pretrained/2023-05-31/nms_config_yolox_s_wide_leaky.json + meta_arch: yolox + hpp: true info: task: object detection input_shape: 640x640x3 output_shape: 80x80x4, 80x80x1, 80x80x80, 40x40x4, 40x40x1, 40x40x80, 20x20x4, 20x20x1, 20x20x80 - operations: 29.73G + operations: 59.46G parameters: 20.12M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/yolox_tiny.yaml b/hailo_model_zoo/cfg/networks/yolox_tiny.yaml index 9353807b..c0517012 100644 --- a/hailo_model_zoo/cfg/networks/yolox_tiny.yaml +++ b/hailo_model_zoo/cfg/networks/yolox_tiny.yaml @@ -1,22 +1,6 @@ base: -- base/yolo.yaml -postprocessing: - meta_arch: yolox - anchors: - strides: - - 32 - - 16 - - 8 - sizes: - - - 1 - - 1 - - - 1 - - 1 - - - 1 - - 1 +- base/yolox.yaml preprocessing: - centered: false - meta_arch: yolo_v5 input_shape: - 416 - 416 @@ -25,8 +9,8 @@ network: network_name: yolox_tiny paths: network_path: - - models_files/ObjectDetection/Detection-COCO/yolo/yolox/yolox_tiny/pretrained/2022-06-01/yolox_tiny.onnx - url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolox/yolox_tiny/pretrained/2022-06-01/yolox_tiny.zip + - models_files/ObjectDetection/Detection-COCO/yolo/yolox/yolox_tiny/pretrained/2023-05-31/yolox_tiny.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolox/yolox_tiny/pretrained/2023-05-31/yolox_tiny.zip alls_script: yolox_tiny.alls parser: normalization_params: @@ -50,12 +34,18 @@ parser: - Conv_303 - Sigmoid_305 - Sigmoid_306 +postprocessing: + device_pre_post_layers: + nms: true + postprocess_config_file: models_files/ObjectDetection/Detection-COCO/yolo/yolox/yolox_tiny/pretrained/2023-05-31/nms_config_yolox_tiny.json + meta_arch: yolox + hpp: true info: task: object detection input_shape: 416x416x3 output_shape: 52x52x4, 52x52x1, 52x52x80, 26x26x4, 26x26x1, 26x26x80, 13x13x4, 13x13x1, 13x13x80 - operations: 3.22G + operations: 6.44G parameters: 5.05M framework: pytorch training_data: coco train2017 diff --git a/hailo_model_zoo/cfg/networks/zero_dce.yaml b/hailo_model_zoo/cfg/networks/zero_dce.yaml new file mode 100644 index 00000000..f343b2d6 --- /dev/null +++ b/hailo_model_zoo/cfg/networks/zero_dce.yaml @@ -0,0 +1,42 @@ +base: +- base/base.yaml +- base/lol.yaml +preprocessing: + network_type: low_light_enhancement + meta_arch: zero_dce +postprocessing: + meta_arch: zero_dce +network: + network_name: zero_dce +paths: + alls_script: zero_dce.alls + network_path: + - models_files/LowLightEnhancement/LOL/zero_dce/pretrained/2023-04-23/zero_dce.onnx + url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/LowLightEnhancement/LOL/zero_dce/pretrained/2023-04-23/zero_dce.zip +parser: + nodes: + - input.1 + - - Add_49 + normalization_params: + normalize_in_net: true + mean_list: + - 0 + - 0 + - 0 + std_list: + - 255.0 + - 255.0 + - 255.0 +info: + task: low light enhancement + input_shape: 400x600x3 + output_shape: 400x600x3 + operations: 38.2G + parameters: 0.21M + framework: pytorch + training_data: LOL + validation_data: LOL + eval_metric: PSNR + full_precision_result: 16.228 + source: Internal + license_url: https://github.com/hailo-ai/hailo_model_zoo/blob/master/LICENSE diff --git a/hailo_model_zoo/core/datasets/dataset_factory.py b/hailo_model_zoo/core/datasets/dataset_factory.py index 9257fd85..df5d01bb 100644 --- a/hailo_model_zoo/core/datasets/dataset_factory.py +++ b/hailo_model_zoo/core/datasets/dataset_factory.py @@ -2,7 +2,8 @@ parse_widerface, parse_utkfaces, parse_mot, parse_tusimple, parse_landmarks, parse_div2k, parse_pascal, parse_kitti_3d, parse_aflw2k3d, parse_aflw2k3d_tddfa, parse_nyu_depth_v2, parse_300w_lp_tddfa, - parse_lp_ocr, parse_market, parse_peta, parse_bsd100) + parse_lp_ocr, parse_market, parse_peta, parse_bsd100, parse_cifar, parse_lol, + parse_kitti_stereo) def get_dataset_parse_func(ds_name): @@ -22,6 +23,7 @@ def get_dataset_parse_func(ds_name): 'face_landmarks': parse_landmarks.parse_record, 'kitti_depth': parse_kitti_depth.parse_record, 'kitti_3d': parse_kitti_3d.parse_record, + 'kitti_stereo': parse_kitti_stereo.parse_record, 'coco_detection': parse_coco.parse_detection_record, 'open_images': parse_coco.parse_detection_record, 'visdrone_detection': parse_coco.parse_detection_record, @@ -36,6 +38,7 @@ def get_dataset_parse_func(ds_name): 'mot16': parse_mot.parse_mot_record, 'tusimple': parse_tusimple.parse, 'div2k': parse_div2k.parse_record, + 'lol': parse_lol.parse_record, 'pascal': parse_pascal.parse_record, 'aflw2k3d': parse_aflw2k3d.parse_record, 'aflw2k3d_tddfa': parse_aflw2k3d_tddfa.parse_record, @@ -48,5 +51,6 @@ def get_dataset_parse_func(ds_name): 'personface_detection': parse_coco.parse_detection_record, 'peta': parse_peta.parse_classification_record, 'celeba': parse_peta.parse_classification_record, + 'cifar100': parse_cifar.parse_cifar100_record, 'bsd100': parse_bsd100.parse_record, }[ds_name] diff --git a/hailo_model_zoo/core/datasets/parse_cifar.py b/hailo_model_zoo/core/datasets/parse_cifar.py new file mode 100644 index 00000000..2002e1af --- /dev/null +++ b/hailo_model_zoo/core/datasets/parse_cifar.py @@ -0,0 +1,23 @@ +import tensorflow as tf + + +def parse_cifar100_record(serialized_example): + """Parse serialized example of TfRecord and extract dictionary of all the information + """ + features = tf.io.parse_single_example( + serialized_example, + features={ + 'height': tf.io.FixedLenFeature([], tf.int64), + 'width': tf.io.FixedLenFeature([], tf.int64), + 'label_index': tf.io.FixedLenFeature([], tf.int64), + 'image_numpy': tf.io.FixedLenFeature([], tf.string) + }) + + height = tf.cast(features['height'], tf.int32) + width = tf.cast(features['width'], tf.int32) + label_index = tf.cast(features['label_index'], tf.int32) + image = tf.io.decode_raw(features['image_numpy'], tf.uint8) + image_shape = tf.stack([height, width, 3]) + image = tf.reshape(image, image_shape) + image_info = {'label_index': label_index} + return [image, image_info] diff --git a/hailo_model_zoo/core/datasets/parse_kitti_stereo.py b/hailo_model_zoo/core/datasets/parse_kitti_stereo.py new file mode 100644 index 00000000..39bcf379 --- /dev/null +++ b/hailo_model_zoo/core/datasets/parse_kitti_stereo.py @@ -0,0 +1,38 @@ +import tensorflow as tf + + +def parse_record(serialized_example): + """Parse serialized example of TfRecord and extract dictionary of all the information + """ + features = tf.io.parse_single_example( + serialized_example, + features={ + 'height_l': tf.io.FixedLenFeature([], tf.int64), + 'width_l': tf.io.FixedLenFeature([], tf.int64), + 'height_r': tf.io.FixedLenFeature([], tf.int64), + 'width_r': tf.io.FixedLenFeature([], tf.int64), + 'image_l_name': tf.io.FixedLenFeature([], tf.string), + 'image_r_name': tf.io.FixedLenFeature([], tf.string), + 'image_l_png': tf.io.FixedLenFeature([], tf.string), + 'image_r_png': tf.io.FixedLenFeature([], tf.string), + 'label_l_name': tf.io.FixedLenFeature([], tf.string), + 'label_r_name': tf.io.FixedLenFeature([], tf.string), + 'label_l': tf.io.FixedLenFeature([], tf.string) + }) + + height_l = tf.cast(features['height_l'], tf.int32) + width_l = tf.cast(features['width_l'], tf.int32) + height_r = tf.cast(features['height_r'], tf.int32) + width_r = tf.cast(features['width_r'], tf.int32) + image_l_name = tf.cast(features['image_l_name'], tf.string) + image_r_name = tf.cast(features['image_r_name'], tf.string) + image_l = tf.cast(tf.image.decode_png(features['image_l_png'], channels=3), tf.float32) + image_r = tf.cast(tf.image.decode_png(features['image_r_png'], channels=3), tf.float32) + label_l = tf.io.decode_raw(features['label_l'], tf.float32) / 255.0 + label_l = tf.reshape(label_l, (height_l, width_l, 1)) + images = {'image_l': image_l, 'image_r': image_r} + image_info = {'image_l_name': image_l_name, 'image_r_name': image_r_name, + 'gt_l': label_l, + 'height_l': height_l, 'width_l': width_l, + 'height_r': height_r, 'width_r': width_r} + return [images, image_info] diff --git a/hailo_model_zoo/core/datasets/parse_lol.py b/hailo_model_zoo/core/datasets/parse_lol.py new file mode 100644 index 00000000..06719035 --- /dev/null +++ b/hailo_model_zoo/core/datasets/parse_lol.py @@ -0,0 +1,30 @@ +import tensorflow as tf + + +def parse_record(serialized_example): + """Parse serialized example of TfRecord and extract dictionary of all the information + """ + features = tf.io.parse_single_example( + serialized_example, + features={ + 'height': tf.io.FixedLenFeature([], tf.int64), + 'width': tf.io.FixedLenFeature([], tf.int64), + 'image_name': tf.io.FixedLenFeature([], tf.string), + 'll_img': tf.io.FixedLenFeature([], tf.string), + 'll_enhanced_img': tf.io.FixedLenFeature([], tf.string), + 'format': tf.io.FixedLenFeature([], tf.string) + }) + + height = tf.cast(features['height'], tf.int32) + width = tf.cast(features['width'], tf.int32) + image_name = tf.cast(features['image_name'], tf.string) + ll_image = tf.io.decode_raw(features['ll_img'], tf.uint8) + ll_image_shape = tf.stack([height, width, 3]) + ll_image = tf.reshape(ll_image, ll_image_shape) + ll_enhanced_image = tf.io.decode_raw(features['ll_enhanced_img'], tf.uint8) + ll_enhanced_image = tf.reshape(ll_enhanced_image, ll_image_shape) + image_info = {'image_name': image_name, + 'll_enhanced_img': ll_enhanced_image, + 'height': height, + 'width': width} + return [ll_image, image_info] diff --git a/hailo_model_zoo/core/eval/eval_factory.py b/hailo_model_zoo/core/eval/eval_factory.py index e076e76c..269f2405 100644 --- a/hailo_model_zoo/core/eval/eval_factory.py +++ b/hailo_model_zoo/core/eval/eval_factory.py @@ -9,6 +9,7 @@ from hailo_model_zoo.core.eval.instance_segmentation_evaluation import InstanceSegmentationEval from hailo_model_zoo.core.eval.depth_estimation_evaluation import DepthEstimationEval from hailo_model_zoo.core.eval.super_resolution_evaluation import SuperResolutionEval +from hailo_model_zoo.core.eval.low_light_enhancement_evaluation import LowLightEnhancementEval from hailo_model_zoo.core.eval.srgan_evaluation import SRGANEval from hailo_model_zoo.core.eval.head_pose_estimation_evaluation import HeadPoseEstimationEval from hailo_model_zoo.core.eval.multiple_object_tracking_evaluation import MultipleObjectTrackingEval @@ -21,6 +22,7 @@ from hailo_model_zoo.core.eval.person_reid_evaluation import PersonReidEval from hailo_model_zoo.core.eval.person_attr_evaluation import PersonAttrEval from hailo_model_zoo.core.eval.single_person_pose_estimation_evaluation import SinglePersonPoseEstimationEval +from hailo_model_zoo.core.eval.stereo_evaluation import StereoNetEval class EmptyEval(): @@ -43,6 +45,7 @@ def get_evaluation(name): """ evaluation_map = { 'classification': ClassificationEval, + 'zero_shot_classification': ClassificationEval, 'segmentation': SegmentationEval, 'detection': DetectionEval, 'pose_estimation': PoseEstimationEval, @@ -68,6 +71,8 @@ def get_evaluation(name): 'face_attr': PersonAttrEval, 'single_person_pose_estimation': SinglePersonPoseEstimationEval, 'super_resolution': SuperResolutionEval, + 'low_light_enhancement': LowLightEnhancementEval, + 'stereonet': StereoNetEval } if name not in evaluation_map: diff --git a/hailo_model_zoo/core/eval/instance_segmentation_evaluation.py b/hailo_model_zoo/core/eval/instance_segmentation_evaluation.py index 69643a8d..ece81bd7 100644 --- a/hailo_model_zoo/core/eval/instance_segmentation_evaluation.py +++ b/hailo_model_zoo/core/eval/instance_segmentation_evaluation.py @@ -15,6 +15,7 @@ 'yolact': YolactEval, 'yolov5_seg': Yolov5SegEval, 'sparseinst': SparseInstEval, + 'yolov8_seg': Yolov5SegEval } diff --git a/hailo_model_zoo/core/eval/low_light_enhancement_evaluation.py b/hailo_model_zoo/core/eval/low_light_enhancement_evaluation.py new file mode 100644 index 00000000..81b7c669 --- /dev/null +++ b/hailo_model_zoo/core/eval/low_light_enhancement_evaluation.py @@ -0,0 +1,45 @@ +import numpy as np +from collections import OrderedDict + +from hailo_model_zoo.core.eval.eval_base_class import Eval +# Calculation is based on: https://torchmetrics.readthedocs.io/en/stable/image/peak_signal_noise_ratio.html + + +class LowLightEnhancementEval(Eval): + def __init__(self, **kwargs): + self._metric_names = ['PSNR'] + self._metrics_vals = [0] + self.reset() + + def _parse_net_output(self, net_output): + return net_output['predictions'] + + def update_op(self, net_output, gt_labels): + net_output = self._parse_net_output(net_output) + self.sum_squared_error += self._aggregate(net_output, gt_labels) + self.n_obs += net_output.size + + def is_percentage(self): + return False + + def evaluate(self): + _data_range = self.target_max - self.target_min + _psnr = 10.0 * np.log10(np.square(_data_range) / (self.sum_squared_error / self.n_obs)) + self._metrics_vals[0] = _psnr + + def _get_accuracy(self): + return OrderedDict([(self._metric_names[0], self._metrics_vals[0])]) + + def reset(self): + self._psnr = [] + self.sum_squared_error = 0 + self.n_obs = 0 + self.target_min = 1.0 + self.target_max = 0.0 + + def _aggregate(self, net_output, gt_labels): + _sum_squared_error = np.sum(np.square(net_output - gt_labels['enhanced_img_processed'])) + target_min, target_max = gt_labels['enhanced_img_processed'].min(), gt_labels['enhanced_img_processed'].max() + self.target_min = min(self.target_min, target_min) + self.target_max = max(self.target_max, target_max) + return _sum_squared_error diff --git a/hailo_model_zoo/core/eval/stereo_evaluation.py b/hailo_model_zoo/core/eval/stereo_evaluation.py new file mode 100644 index 00000000..f0333920 --- /dev/null +++ b/hailo_model_zoo/core/eval/stereo_evaluation.py @@ -0,0 +1,41 @@ +from collections import OrderedDict +import numpy as np +from hailo_model_zoo.core.eval.eval_base_class import Eval + + +class StereoNetEval(Eval): + def __init__(self, **kwargs): + self.TotalEPE = 0 + self.count = 0 + self.avgEPE = 0 + self.reset() + + def _parse_net_output(self, net_output): + return net_output['predictions'] + + def update_op(self, net_output, img_info): + net_output = self._parse_net_output(net_output) + for i in range(net_output.shape[0]): # update per inference in batch + pred_disp = net_output[i] + true_disp = img_info['gt_l'][i] + diff = np.zeros(true_disp.shape) + index = np.argwhere(true_disp > 0) # ignore non-relevant indices + diff[index[:, 0], index[:, 1], index[:, 2]] = np.abs( + true_disp[index[:, 0], index[:, 1], index[:, 2]] - pred_disp[index[:, 0], index[:, 1], index[:, 2]]) + correct = (diff[index[:, 0], index[:, 1], index[:, 2]] < 3) | ( + diff[index[:, 0], index[:, 1], index[:, 2]] < true_disp[index[:, 0], index[:, 1], index[:, 2]] * 0.05) + # pixel prediction is true if diff is smaller than 3 or 5% + three_pixel_correct_rate = float(np.sum(correct)) / float(len(index[:, 0])) + self.TotalEPE += three_pixel_correct_rate + + self.count += net_output.shape[0] + + def evaluate(self): + self.avgEPE = self.TotalEPE / self.count + + def _get_accuracy(self): + return OrderedDict([('EPE', self.avgEPE)]) + + def reset(self): + self.TotalEPE = 0 + self.count = 0 diff --git a/hailo_model_zoo/core/infer/model_infer_lite.py b/hailo_model_zoo/core/infer/model_infer_lite.py index cc6f27db..d27678aa 100644 --- a/hailo_model_zoo/core/infer/model_infer_lite.py +++ b/hailo_model_zoo/core/infer/model_infer_lite.py @@ -43,6 +43,7 @@ def predict_function(data): del img_info["img_resized"] image_info = to_numpy(img_info) if not visualize_callback and not dump_results: + logits_batch = to_numpy(logits_batch) eval_metric.update_op(logits_batch, image_info) if visualize_callback: logits.append(logits_batch) diff --git a/hailo_model_zoo/core/main_utils.py b/hailo_model_zoo/core/main_utils.py index 109dc908..4f6f2254 100644 --- a/hailo_model_zoo/core/main_utils.py +++ b/hailo_model_zoo/core/main_utils.py @@ -20,14 +20,20 @@ from hailo_model_zoo.utils.parse_utils import translate_model, get_normalization_params +unsupported_data_folder = { + 'stereonet' +} + + def _get_input_shape(runner, network_info): return (network_info.preprocessing.input_shape or runner.get_hn_model().get_input_layers()[0].output_shape[1:]) -def resolve_alls_path(path, performance=False): +def resolve_alls_path(path, hw_arch='hailo8', performance=False): if not path: return None - return path_resolver.resolve_alls_path(Path("base" if not performance else "performance") / path) + hw_arch = "hailo8" if hw_arch == "hailo8l" else hw_arch + return path_resolver.resolve_alls_path(Path(hw_arch) / Path("base" if not performance else "performance") / path) def _apply_output_scheme(runner, network_info): @@ -120,6 +126,8 @@ def make_preprocessing(runner, network_info): hn_editor = network_info.hn_editor yuv2rgb = hn_editor.yuv2rgb yuy2 = hn_editor.yuy2 + nv12 = hn_editor.nv12 + rgbx = hn_editor.rgbx input_resize = hn_editor.input_resize normalize_in_net, mean_list, std_list = get_normalization_params(network_info) normalization_params = [mean_list, std_list] if not normalize_in_net else None @@ -127,26 +135,28 @@ def make_preprocessing(runner, network_info): flip = runner.get_hn_model().is_transposed() preproc_callback = preprocessing_factory.get_preprocessing( - meta_arch, height=height, width=width, flip=flip, yuv2rgb=yuv2rgb, yuy2=yuy2, + meta_arch, height=height, width=width, flip=flip, yuv2rgb=yuv2rgb, yuy2=yuy2, nv12=nv12, rgbx=rgbx, input_resize=input_resize, normalization_params=normalization_params, **preprocessing_args) return preproc_callback -def _make_data_feed_callback(batch_size, data_path, dataset_name, two_stage_arch, preproc_callback): +def _make_data_feed_callback(batch_size, data_path, dataset_name, two_stage_arch, preproc_callback, network_info): data_path = Path(data_path) if not data_path.exists(): raise FileNotFoundError(f"Couldn't find dataset in {data_path}. Please refer to docs/DATA.rst.") data_tf = True if data_path.is_file() and data_path.suffix in [".tfrecord", ".000"] else False args = (preproc_callback, batch_size, data_path) - + name = network_info.network.network_name if two_stage_arch: func = data.RegionProposalFeed elif data_tf: func = data.TFRecordFeed args += (dataset_name,) elif data_path.is_dir(): + if name in unsupported_data_folder: + raise ValueError(f'Folder data path is currently not supported for {name}') func = data.ImageFeed else: func = data.VideoFeed @@ -155,7 +165,8 @@ def _make_data_feed_callback(batch_size, data_path, dataset_name, two_stage_arch def _make_dataset_callback(network_info, batch_size, preproc_callback, absolute_path, dataset_name): two_stage_arch = network_info.evaluation.two_stage_arch - return _make_data_feed_callback(batch_size, absolute_path, dataset_name, two_stage_arch, preproc_callback) + return _make_data_feed_callback(batch_size, absolute_path, dataset_name, two_stage_arch, + preproc_callback, network_info) def make_evalset_callback(network_info, batch_size, preproc_callback, override_path, return_dataset=False): @@ -169,6 +180,8 @@ def make_evalset_callback(network_info, batch_size, preproc_callback, override_p def make_calibset_callback(network_info, batch_size, preproc_callback, override_path): dataset_name = network_info.quantization.calib_set_name or network_info.evaluation.dataset_name + if override_path is None and network_info.quantization.calib_set is None: + raise ValueError("Optimization requires calibration data, please modify YAML or use --calib-path") calib_path = override_path or path_resolver.resolve_data_path(network_info.quantization.calib_set[0]) data_feed_cb = _make_dataset_callback(network_info, batch_size, preproc_callback, calib_path, dataset_name) dataset = data_feed_cb()._dataset if batch_size is None else data_feed_cb()._dataset.unbatch() diff --git a/hailo_model_zoo/core/postprocessing/classification_postprocessing.py b/hailo_model_zoo/core/postprocessing/classification_postprocessing.py index 6dbf26ad..3418e771 100644 --- a/hailo_model_zoo/core/postprocessing/classification_postprocessing.py +++ b/hailo_model_zoo/core/postprocessing/classification_postprocessing.py @@ -5,6 +5,8 @@ from PIL import Image from PIL import ImageDraw +from hailo_model_zoo.utils import path_resolver + class PostprocessingException(Exception): pass @@ -50,3 +52,14 @@ def visualize_classification_result(logits, img, **kwargs): ImageDraw.Draw(img_orig).text((0, 0), "{} ({:.2f})".format(imagenet_labels[int(top1[0] - labels_offset)], conf), (255, 0, 0)) return np.array(img_orig, np.uint8) + + +def zero_shot_classification_postprocessing(endnodes, device_pre_post_layers=None, **kwargs): + endnodes /= tf.norm(endnodes, keepdims=True, axis=-1) + path = path_resolver.resolve_data_path(kwargs['postprocess_config_file']) + text_features = np.load(path) + similarity = tf.linalg.matmul(100.0 * endnodes, text_features, transpose_b=True) + if len(similarity.shape) == 4: + similarity = tf.squeeze(similarity, [1, 2]) + probs = tf.nn.softmax(similarity, axis=-1) + return {'predictions': probs} diff --git a/hailo_model_zoo/core/postprocessing/detection/detection_common.py b/hailo_model_zoo/core/postprocessing/detection/detection_common.py index bb01b5cb..c8811d7a 100644 --- a/hailo_model_zoo/core/postprocessing/detection/detection_common.py +++ b/hailo_model_zoo/core/postprocessing/detection/detection_common.py @@ -18,7 +18,7 @@ def translate_coco_2017_to_2014(nmsed_classes): return np.vectorize(COCO_2017_TO_2014_TRANSLATION.get)(nmsed_classes).astype(np.int32) -def tf_postproc_nms(endnodes, score_threshold, coco_2017_to_2014=True): +def tf_postproc_nms(endnodes, labels_offset, score_threshold, coco_2017_to_2014=True): def _single_batch_parse(args): frame_detections = args[:, :, :] boxes = frame_detections[:, :, :4] @@ -26,7 +26,7 @@ def _single_batch_parse(args): indices = tf.where(scores > score_threshold) boxes_after_tsh = tf.gather_nd(boxes, indices) scores_after_tsh = tf.gather_nd(scores, indices) - class_after_tsh = tf.cast(indices[:, 0], tf.int32) + 1 + class_after_tsh = tf.cast(indices[:, 0], tf.int32) + labels_offset num_detection_after_tsh = tf.shape(indices)[0] padding_size = 100 - num_detection_after_tsh if padding_size > 0: diff --git a/hailo_model_zoo/core/postprocessing/detection/detr.py b/hailo_model_zoo/core/postprocessing/detection/detr.py index a8480705..46bc468f 100644 --- a/hailo_model_zoo/core/postprocessing/detection/detr.py +++ b/hailo_model_zoo/core/postprocessing/detection/detr.py @@ -5,9 +5,11 @@ class DetrPostProc(object): def __init__(self, **kwargs): pass - def detr_postprocessing(self, endnodes, **kwargs): + def detr_postprocessing(self, endnodes, sigmoid=True, **kwargs): logits = tf.squeeze(endnodes[0], [1]) # [batch, 1, 100, 92] -> [batch, 100, 92] boxes = tf.squeeze(endnodes[1], [1]) # [batch, 1, 100, 4] -> [batch, 100, 4] + if sigmoid: + boxes = tf.nn.sigmoid(boxes) # SoftMax to get scores and class predictions probs = tf.nn.softmax(logits, axis=-1) # [batch, queries, 92] diff --git a/hailo_model_zoo/core/postprocessing/detection/efficientdet.py b/hailo_model_zoo/core/postprocessing/detection/efficientdet.py index a79b0d91..bcfeadf9 100644 --- a/hailo_model_zoo/core/postprocessing/detection/efficientdet.py +++ b/hailo_model_zoo/core/postprocessing/detection/efficientdet.py @@ -19,15 +19,17 @@ def __init__(self, img_dims, nms_iou_thresh, score_threshold, anchors, if anchors is None: raise ValueError('Missing detection anchors metadata') self._anchors_type = anchors["type"] - self._anchors_input = tf.reshape(tf.numpy_function(self.anchors_for_shape, - [img_dims, - np.array(anchors["aspect_ratios"]), - np.array(anchors["scales"]), - np.array(anchors["sizes"]), - np.array(anchors["strides"])], - ['float32'])[0], (1, -1, 4)) - self._nms_on_device = self._nms_on_device = kwargs["device_pre_post_layers"].get( + self._hpp = kwargs.get("hpp", False) + self._nms_on_device = kwargs["device_pre_post_layers"].get( 'nms', False) if kwargs["device_pre_post_layers"] else False + if not self._hpp and not self._nms_on_device: + self._anchors_input = tf.reshape(tf.numpy_function(self.anchors_for_shape, + [img_dims, + np.array(anchors["aspect_ratios"]), + np.array(anchors["scales"]), + np.array(anchors["sizes"]), + np.array(anchors["strides"])], + ['float32'])[0], (1, -1, 4)) def bbox_transform_inv(self, deltas): cxa = (self._anchors_input[..., 0] + self._anchors_input[..., 2]) / 2 @@ -54,11 +56,15 @@ def clip_boxes(self, boxes): return tf.stack([y1, x1, y2, x2], axis=2) def postprocessing(self, endnodes, **kwargs): - if self._nms_on_device: - return tf_postproc_nms(endnodes, self._score_threshold, False) + if self._nms_on_device or self._hpp: + return tf_postproc_nms(endnodes, + labels_offset=kwargs['labels_offset'], + score_threshold=self._score_threshold, + coco_2017_to_2014=False) with tf.name_scope('Postprocessor'): regression, classification = collect_box_class_predictions(endnodes, self._num_classes, self._anchors_type) - classification = tf.sigmoid(classification) + if not kwargs['device_pre_post_layers']['sigmoid']: + classification = tf.sigmoid(classification) boxes = self.bbox_transform_inv(regression) boxes = self.clip_boxes(boxes) (nmsed_boxes, nmsed_scores, nmsed_classes, num_detections) = \ diff --git a/hailo_model_zoo/core/postprocessing/detection/ssd.py b/hailo_model_zoo/core/postprocessing/detection/ssd.py index 282be606..e348ef5f 100644 --- a/hailo_model_zoo/core/postprocessing/detection/ssd.py +++ b/hailo_model_zoo/core/postprocessing/detection/ssd.py @@ -108,7 +108,7 @@ class SSDPostProc(object): def __init__(self, img_dims=(300, 300), nms_iou_thresh=0.6, score_threshold=0.3, anchors=None, classes=90, - **kwargs): + should_clip=True, **kwargs): self._image_dims = img_dims self._nms_iou_thresh = nms_iou_thresh self._score_threshold = score_threshold @@ -117,9 +117,11 @@ def __init__(self, img_dims=(300, 300), nms_iou_thresh=0.6, raise ValueError('Missing detection anchors metadata') self._anchors = BoxSpecsCreator(anchors) self._nms_on_device = False + self._should_clip = should_clip if kwargs["device_pre_post_layers"] and kwargs["device_pre_post_layers"].get('nms', False): self._nms_on_device = True self.hpp = kwargs.get("hpp", False) + self.sigmoid = kwargs["device_pre_post_layers"].get("sigmoid", False) @staticmethod def expanded_shape(orig_shape, start_dim, num_dims): @@ -235,7 +237,8 @@ def tf_postproc(self, endnodes): box_predictions, classes_predictions = \ collect_box_class_predictions(endnodes, self._num_classes, self._anchors._type) # Score Conversion using Sigmoid function - detection_scores = tf.sigmoid(classes_predictions) + if not self.sigmoid: + detection_scores = tf.sigmoid(classes_predictions) # detection_scores = tf.identity(classes_predictions_sigmoid, 'raw_box_scores') # Slicing Background class score (for a single class no need to slice) @@ -267,7 +270,8 @@ def tf_postproc(self, endnodes): score_threshold=self._score_threshold, iou_threshold=self._nms_iou_thresh, max_output_size_per_class=100, - max_total_size=100) + max_total_size=100, + clip_boxes=self._should_clip) # adding offset to the class prediction and cast to integer nmsed_classes = tf.cast(tf.add(nmsed_classes, self.label_offset), tf.int16) @@ -278,6 +282,9 @@ def tf_postproc(self, endnodes): def postprocessing(self, endnodes, **kwargs): if self._nms_on_device or self.hpp: - return tf_postproc_nms(endnodes, self._score_threshold, False) + return tf_postproc_nms(endnodes, + labels_offset=kwargs['labels_offset'], + score_threshold=self._score_threshold, + coco_2017_to_2014=False) else: return self.tf_postproc(endnodes) diff --git a/hailo_model_zoo/core/postprocessing/detection/yolo.py b/hailo_model_zoo/core/postprocessing/detection/yolo.py index 47ba6e06..5c6f21e7 100644 --- a/hailo_model_zoo/core/postprocessing/detection/yolo.py +++ b/hailo_model_zoo/core/postprocessing/detection/yolo.py @@ -14,7 +14,7 @@ def sigmoid(x): class YoloPostProc(object): def __init__(self, img_dims=(608, 608), nms_iou_thresh=0.45, score_threshold=0.01, anchors=None, output_scheme=None, classes=80, - labels_offset=0, meta_arch="yolo_v3", **kwargs): + labels_offset=0, meta_arch="yolo_v3", should_clip=True, **kwargs): self._network_arch = meta_arch self._image_dims = img_dims @@ -31,8 +31,10 @@ def __init__(self, img_dims=(608, 608), nms_iou_thresh=0.45, score_threshold=0.0 'yolo_v4': YoloPostProc._yolo4_decode, "yolo_v5": YoloPostProc._yolo5_decode, "yolox": YoloPostProc._yolox_decode, + "yolo_v6": YoloPostProc._yolo6_decode, } self._nms_on_device = False + self._should_clip = should_clip if kwargs["device_pre_post_layers"] and kwargs["device_pre_post_layers"].get('nms', False): self._nms_on_device = True self.hpp = kwargs.get("hpp", False) # not needed once SDK change the output shape of emulator @@ -67,6 +69,14 @@ def _yolox_decode(raw_box_centers, raw_box_scales, objness, class_pred, anchors_ box_scales = (np.exp(raw_box_scales) * stride) # dim [N, HxW, 3, 2] return box_centers, box_scales, objness, class_pred + @staticmethod + def _yolo6_decode(raw_box_centers, raw_box_scales, objness, class_pred, anchors_for_stride, offsets, stride): + x1y1 = offsets + 0.5 - raw_box_centers + x2y2 = offsets + 0.5 + raw_box_scales + box_centers = ((x1y1 + x2y2) / 2) * stride + box_scales = (x2y2 - x1y1) * stride + return box_centers, box_scales, objness, class_pred + def iou_nms(self, endnodes): endnodes = tf.transpose(endnodes, [0, 3, 1, 2]) detection_boxes = endnodes[:, :, :, :4] @@ -143,7 +153,8 @@ def yolo_postprocessing(self, endnodes, **kwargs): score_threshold=self.score_threshold, iou_threshold=self._nms_iou_thresh, max_output_size_per_class=100, - max_total_size=100) + max_total_size=100, + clip_boxes=self._should_clip,) # adding offset to the class prediction and cast to integer def translate_coco_2017_to_2014(nmsed_classes): @@ -235,6 +246,12 @@ def reorganize_split_output(self, endnodes): scales = endnodes[branch_index][:, :, :, 2:] obj = endnodes[branch_index + 1] probs = endnodes[branch_index + 2] + elif 'yolo_v6' in self._network_arch: + branch_index = int(2 * index) + centers = endnodes[branch_index][:, :, :, :2] + scales = endnodes[branch_index][:, :, :, 2:] + probs = endnodes[branch_index + 1] + obj = tf.ones((1, 1, 1, 2)) # Create dummy objectness tensor else: centers = endnodes[branch_index] scales = endnodes[branch_index + 1] @@ -250,6 +267,9 @@ def reorganize_split_output(self, endnodes): def reorganize_split_output_numpy(self, centers, scales, obj, probs): num_anchors = len(self._anchors_list[0]) // 2 # the ith element in anchors_list is a list for the x,y # anchor values in the ith output layer (stride) + if obj.shape == [1, 1, 1, 2]: # yolov6 + # Convert dummy to a ones of shape [B, h, w, 1] for objectness + obj = np.ones((list(probs.shape[:3]) + [1]), dtype=np.float32) for anchor in range(num_anchors): concat_arrays_for_anchor = [centers[:, :, :, 2 * anchor:2 * anchor + 2], scales[:, :, :, 2 * anchor:2 * anchor + 2], @@ -287,7 +307,10 @@ def translate_coco_2017_to_2014(nmsed_classes): def postprocessing(self, endnodes, **kwargs): if self.hpp: - return tf_postproc_nms(endnodes, score_threshold=0.0, coco_2017_to_2014=True) + return tf_postproc_nms(endnodes, + labels_offset=kwargs['labels_offset'], + score_threshold=0.0, + coco_2017_to_2014=True) if self._nms_on_device: return self.iou_nms(endnodes) else: diff --git a/hailo_model_zoo/core/postprocessing/instance_segmentation_postprocessing.py b/hailo_model_zoo/core/postprocessing/instance_segmentation_postprocessing.py index 642ca504..77563058 100644 --- a/hailo_model_zoo/core/postprocessing/instance_segmentation_postprocessing.py +++ b/hailo_model_zoo/core/postprocessing/instance_segmentation_postprocessing.py @@ -432,12 +432,15 @@ def crop_mask(masks, boxes): boxes: numpy array of bbox coords with shape [n, 4] """ - n_masks, h, w = masks.shape - x1, y1, x2, y2 = np.array_split(boxes[:, :, None], 4, axis=1) - rows = np.arange(w)[None, None, :] - cols = np.arange(h)[None, :, None] - - return masks * ((rows >= x1) * (rows < x2) * (cols >= y1) * (cols < y2)) + n_masks, _, _ = masks.shape + integer_boxes = np.ceil(boxes).astype(int) + x1, y1, x2, y2 = np.array_split(np.where(integer_boxes > 0, integer_boxes, 0), 4, axis=1) + for k in range(n_masks): + masks[k, :y1[k, 0], :] = 0 + masks[k, y2[k, 0]:, :] = 0 + masks[k, :, :x1[k, 0]] = 0 + masks[k, :, x2[k, 0]:] = 0 + return masks def process_mask(protos, masks_in, bboxes, shape, upsample=True, @@ -564,7 +567,7 @@ def _make_grid(anchors, stride, bs=8, nx=20, ny=20): def sparseinst_postprocess(endnodes, device_pre_post_layers=None, scale_factor=2, num_groups=4, **kwargs): - inst_kernels_path = path_resolver.resolve_data_path(kwargs['postprocess_config_json']) + inst_kernels_path = path_resolver.resolve_data_path(kwargs['postprocess_config_file']) meta_arch = kwargs.get('meta_arch', 'sparseinst_giam') inst_kernels = np.load(inst_kernels_path, allow_pickle=True)['arr_0'][()] @@ -864,6 +867,107 @@ def _finalize_detections_yolact(det_output, protos, score_thresh=0.2, crop_masks return outputs +def _yolov8_decoding(raw_boxes, strides, image_dims, reg_max): + boxes = None + for box_distribute, stride in zip(raw_boxes, strides): + # create grid + shape = [int(x / stride) for x in image_dims] + grid_x = np.arange(shape[1]) + 0.5 + grid_y = np.arange(shape[0]) + 0.5 + grid_x, grid_y = np.meshgrid(grid_x, grid_y) + ct_row = grid_y.flatten() * stride + ct_col = grid_x.flatten() * stride + center = np.stack((ct_col, ct_row, ct_col, ct_row), axis=1) + + # box distribution to distance + reg_range = np.arange(reg_max + 1) + box_distribute = np.reshape( + box_distribute, (-1, box_distribute.shape[1] * box_distribute.shape[2], 4, reg_max + 1)) + box_distance = _softmax(box_distribute) + box_distance = box_distance * np.reshape(reg_range, (1, 1, 1, -1)) + box_distance = np.sum(box_distance, axis=-1) + box_distance = box_distance * stride + + # decode box + box_distance = np.concatenate([box_distance[:, :, :2] * (-1), box_distance[:, :, 2:]], axis=-1) + decode_box = np.expand_dims(center, axis=0) + box_distance + + xmin = decode_box[:, :, 0] + ymin = decode_box[:, :, 1] + xmax = decode_box[:, :, 2] + ymax = decode_box[:, :, 3] + decode_box = np.transpose([xmin, ymin, xmax, ymax], [1, 2, 0]) + + xywh_box = np.transpose([(xmin + xmax) / 2, (ymin + ymax) / 2, xmax - xmin, ymax - ymin], [1, 2, 0]) + boxes = xywh_box if boxes is None else np.concatenate([boxes, xywh_box], axis=1) + return boxes # tf.expand_dims(boxes, axis=2) + + +def yolov8_seg_postprocess(endnodes, device_pre_post_layers=None, **kwargs): + """ + endnodes is a list of 10 tensors: + endnodes[0]: bbox output with shapes (BS, 20, 20, 64) + endnodes[1]: scores output with shapes (BS, 20, 20, 80) + endnodes[2]: mask coeff output with shapes (BS, 20, 20, 32) + endnodes[3]: bbox output with shapes (BS, 40, 40, 64) + endnodes[4]: scores output with shapes (BS, 40, 40, 80) + endnodes[5]: mask coeff output with shapes (BS, 40, 40, 32) + endnodes[6]: bbox output with shapes (BS, 80, 80, 64) + endnodes[7]: scores output with shapes (BS, 80, 80, 80) + endnodes[8]: mask coeff output with shapes (BS, 80, 80, 32) + endnodes[9]: mask protos with shape (BS, 160, 160, 32) + Returns: + A list of per image detections, where each is a dictionary with the following structure: + { + 'detection_boxes': numpy.ndarray with shape (num_detections, 4), + 'mask': numpy.ndarray with shape (num_detections, 160, 160), + 'detection_classes': numpy.ndarray with shape (num_detections, 80), + 'detection_scores': numpy.ndarray with shape (num_detections, 80) + } + """ + num_classes = kwargs['classes'] + strides = kwargs['anchors']['strides'][::-1] + image_dims = tuple(kwargs['img_dims']) + reg_max = kwargs['anchors']['regression_length'] + raw_boxes = endnodes[:7:3] + scores = [np.reshape(s, (-1, s.shape[1] * s.shape[2], num_classes)) for s in endnodes[1:8:3]] + scores = np.concatenate(scores, axis=1) + outputs = [] + decoded_boxes = _yolov8_decoding(raw_boxes, strides, image_dims, reg_max) + score_thres = kwargs['score_threshold'] + iou_thres = kwargs['nms_iou_thresh'] + proto_data = endnodes[9] + batch_size, _, _, n_masks = proto_data.shape + + # add objectness=1 for working with yolov5_nms + fake_objectness = np.ones((scores.shape[0], scores.shape[1], 1)) + scores_obj = np.concatenate([fake_objectness, scores], axis=-1) + + coeffs = [np.reshape(c, (-1, c.shape[1] * c.shape[2], n_masks)) for c in endnodes[2:9:3]] + coeffs = np.concatenate(coeffs, axis=1) + + # re-arrange predictions for yolov5_nms + predictions = np.concatenate([decoded_boxes, scores_obj, coeffs], axis=2) + + nms_res = non_max_suppression(predictions, conf_thres=score_thres, iou_thres=iou_thres, multi_label=True) + masks = [] + outputs = [] + for b in range(batch_size): + protos = proto_data[b] + masks = process_mask(protos, nms_res[b]['mask'], nms_res[b] + ['detection_boxes'], image_dims, upsample=True) + output = {} + output['detection_boxes'] = np.array(nms_res[b]['detection_boxes']) + if masks is not None: + output['mask'] = np.transpose(masks, (0, 1, 2)) + else: + output['mask'] = masks + output['detection_scores'] = np.array(nms_res[b]['detection_scores']) + output['detection_classes'] = np.array(nms_res[b]['detection_classes']).astype(int) + outputs.append(output) + return outputs + + def instance_segmentation_postprocessing(endnodes, device_pre_post_layers=None, **kwargs): meta_arch = kwargs.get('meta_arch', '') if 'sparseinst' in meta_arch: @@ -878,6 +982,10 @@ def instance_segmentation_postprocessing(endnodes, device_pre_post_layers=None, predictions = yolact_postprocessing(endnodes, device_pre_post_layers=device_pre_post_layers, **kwargs) + elif 'yolov8_seg' in meta_arch: + predictions = yolov8_seg_postprocess(endnodes, + device_pre_post_layers=device_pre_post_layers, + **kwargs) else: raise NotImplementedError(f'Postprocessing {meta_arch} not found') return {'predictions': predictions} @@ -959,7 +1067,7 @@ def visualize_instance_segmentation_result(detections, img, **kwargs): if 'sparseinst' in meta_arch: return visualize_sparseinst_results(detections, img, class_names=dataset_info.class_names, **kwargs) - elif 'yolov5_seg' in meta_arch: + elif 'yolov5_seg' or 'yolov8_seg' in meta_arch: return visualize_yolov5_seg_results(detections, img, class_names=dataset_info.class_names, **kwargs) elif 'yolact' in meta_arch: channels_remove = kwargs["channels_remove"] diff --git a/hailo_model_zoo/core/postprocessing/low_light_enhancement_postprocessing.py b/hailo_model_zoo/core/postprocessing/low_light_enhancement_postprocessing.py new file mode 100644 index 00000000..861fe263 --- /dev/null +++ b/hailo_model_zoo/core/postprocessing/low_light_enhancement_postprocessing.py @@ -0,0 +1,39 @@ +import numpy as np +import cv2 + +""" +properties of patch for image visualization: +""" +""" size fit for screen comparison """ + + +def low_light_enhancement_postprocessing(endnodes, device_pre_post_layers=None, **kwargs): + return {'predictions': endnodes} + + +def visualize_low_light_enhancement_result(logits, img, **kwargs): + """ + Visualizing the output of the Low-Light Enhancement network. + Args: + logits: Numpy array. The low-light-enhancement network output batch + img: Numpy array. The low-light-enhancement network input batch + Returns: + combined_image: Numpy array. An image composed of a low light image (right part), + and the enhanced image (left part). + """ + transpose = False + if 'img_info' in kwargs and 'height' in kwargs['img_info']: + transpose = kwargs['img_info']['height'] > kwargs['img_info']['width'] + + if transpose: + img = np.transpose(img, axes=[0, 2, 1, 3]) + logits = logits['predictions'][0] + + enhanced_img = (logits * 255).astype(np.uint8) # Un-normalize + enhanced_img = cv2.putText(enhanced_img, 'Enhanced image', (5, 40), + cv2.FONT_HERSHEY_SIMPLEX, 0.75, (158, 253, 56), 2) + orig_img = cv2.putText(img[0].astype(np.uint8), 'LowLight image', (5, 40), + cv2.FONT_HERSHEY_SIMPLEX, 0.75, (158, 253, 56), 2) + combined_image = np.concatenate([orig_img, enhanced_img], axis=1) + + return combined_image diff --git a/hailo_model_zoo/core/postprocessing/postprocessing_factory.py b/hailo_model_zoo/core/postprocessing/postprocessing_factory.py index fc8ac232..751037e3 100644 --- a/hailo_model_zoo/core/postprocessing/postprocessing_factory.py +++ b/hailo_model_zoo/core/postprocessing/postprocessing_factory.py @@ -2,6 +2,7 @@ from hailo_model_zoo.core.postprocessing.age_gender_postprocessing import (age_gender_postprocessing, visualize_age_gender_result) from hailo_model_zoo.core.postprocessing.classification_postprocessing import (classification_postprocessing, + zero_shot_classification_postprocessing, visualize_classification_result) from hailo_model_zoo.core.postprocessing.detection_postprocessing import (detection_postprocessing, visualize_detection_result) @@ -18,6 +19,9 @@ from hailo_model_zoo.core.postprocessing.super_resolution_postprocessing import (super_resolution_postprocessing, visualize_super_resolution_result, visualize_srgan_result) +from hailo_model_zoo.core.postprocessing.low_light_enhancement_postprocessing import ( + low_light_enhancement_postprocessing, + visualize_low_light_enhancement_result) from hailo_model_zoo.core.postprocessing.head_pose_estimation_postprocessing import ( head_pose_estimation_postprocessing, visualize_head_pose_result) from hailo_model_zoo.core.postprocessing.lane_detection_postprocessing import (lane_detection_postprocessing, @@ -42,6 +46,8 @@ from hailo_model_zoo.core.postprocessing.mspn_postprocessing import ( mspn_postprocessing, visualize_single_person_pose_estimation_result ) +from hailo_model_zoo.core.postprocessing.stereonet_postprocessing import ( + stereonet_postprocessing, visualize_stereonet_result) try: # THIS CODE IS EXPERIMENTAL AND IN USE ONLY FOR TAPPAS VALIDATION from hailo_model_zoo.core.postprocessing.tappas_postprocessing import tappas_postprocessing @@ -69,6 +75,7 @@ def get_visualization(name, **kwargs): visualization_fn_map = { 'classification': visualize_classification_result, + 'zero_shot_classification': visualize_classification_result, 'segmentation': visualize_segmentation_result, 'detection': visualize_detection_result, 'pose_estimation': visualize_pose_estimation_result, @@ -76,6 +83,7 @@ def get_visualization(name, **kwargs): 'instance_segmentation': visualize_instance_segmentation_result, 'super_resolution': visualize_super_resolution_result, 'super_resolution_srgan': visualize_srgan_result, + 'low_light_enhancement': visualize_low_light_enhancement_result, 'head_pose_estimation': visualize_head_pose_result, 'age_gender': visualize_age_gender_result, 'face_detection': visualize_detection_result, @@ -89,6 +97,7 @@ def get_visualization(name, **kwargs): 'fast_depth': visualize_fast_depth_result, 'ocr': visualize_ocr_result, 'single_person_pose_estimation': visualize_single_person_pose_estimation_result, + 'stereonet': visualize_stereonet_result } if name not in visualization_fn_map: raise ValueError('Visualization name [%s] was not recognized' % name) @@ -111,6 +120,7 @@ def get_postprocessing(name, flip=False): """ postprocessing_fn_map = { 'classification': classification_postprocessing, + 'zero_shot_classification': zero_shot_classification_postprocessing, 'segmentation': segmentation_postprocessing, 'detection': detection_postprocessing, 'pose_estimation': pose_estimation_postprocessing, @@ -121,6 +131,7 @@ def get_postprocessing(name, flip=False): 'instance_segmentation': instance_segmentation_postprocessing, 'super_resolution': super_resolution_postprocessing, 'super_resolution_srgan': super_resolution_postprocessing, + 'low_light_enhancement': low_light_enhancement_postprocessing, 'head_pose_estimation': head_pose_estimation_postprocessing, 'face_detection': face_detection_postprocessing, 'age_gender': age_gender_postprocessing, @@ -134,6 +145,7 @@ def get_postprocessing(name, flip=False): 'person_attr': classification_postprocessing, 'face_attr': face_attr_postprocessing, 'single_person_pose_estimation': mspn_postprocessing, + 'stereonet': stereonet_postprocessing, 'tappas_postprocessing': tappas_postprocessing } diff --git a/hailo_model_zoo/core/postprocessing/stereonet_postprocessing.py b/hailo_model_zoo/core/postprocessing/stereonet_postprocessing.py new file mode 100644 index 00000000..e35fd9a0 --- /dev/null +++ b/hailo_model_zoo/core/postprocessing/stereonet_postprocessing.py @@ -0,0 +1,30 @@ +import io + +import numpy as np +import matplotlib.pyplot as plt + + +def stereonet_postprocessing(logits, device_pre_post_layers=None, **kwargs): + return {'predictions': logits} + + +def visualize_stereonet_result(logits, image, **kwargs): + logits = np.array(logits['predictions'])[0] + image = np.array(kwargs['img_info']['img_orig']) + plt.figure(figsize=(10, 10)) + plt.subplot(2, 1, 1) + plt.imshow(image, cmap='gray') + plt.title("Input", fontsize=22) + plt.axis('off') + plt.subplot(2, 1, 2) + plt.imshow(logits, cmap='gray') + plt.title("Disparity Map", fontsize=22) + plt.axis('off') + with io.BytesIO() as buffer: + plt.savefig(buffer, format='raw') + buffer.seek(0) + result = np.frombuffer(buffer.getvalue(), dtype=np.uint8) + fig = plt.gcf() + w, h = fig.canvas.get_width_height() + result = result.reshape((int(h), int(w), -1)) + return result diff --git a/hailo_model_zoo/core/preprocessing/classification_preprocessing.py b/hailo_model_zoo/core/preprocessing/classification_preprocessing.py index 478df25e..02f10b10 100644 --- a/hailo_model_zoo/core/preprocessing/classification_preprocessing.py +++ b/hailo_model_zoo/core/preprocessing/classification_preprocessing.py @@ -2,6 +2,8 @@ from past.utils import old_div import tensorflow as tf +import numpy as np +from PIL import Image RESIZE_SIDE = 256 VIT_RESIZE_SIDE = 248 @@ -158,6 +160,23 @@ def resmlp(image, image_info=None, output_height=None, output_width=None, **kwar return image, image_info +def pil_resize(image, output_height, output_width): + image_uint = np.array(image, np.uint8) + pil_image = Image.fromarray(image_uint) + resized_image = pil_image.resize((output_width, output_height), Image.BICUBIC) + image_numpy = np.array(resized_image, np.uint8) + return image_numpy + + +def clip(image, image_info=None, output_height=None, output_width=None, **kwargs): + image = tf.numpy_function(pil_resize, [image, output_height, output_width], tf.uint8) + image = tf.cast(image, tf.float32) + image.set_shape([output_height, output_width, 3]) + if image_info: + image_info['img_orig'] = tf.cast(image, tf.uint8) + return image, image_info + + def lprnet(image, image_info=None, output_height=None, output_width=None, **kwargs): image = tf.image.resize([image], [output_height, output_width], method='bicubic')[0] image = tf.squeeze(image) diff --git a/hailo_model_zoo/core/preprocessing/low_light_enhancement_preprocessing.py b/hailo_model_zoo/core/preprocessing/low_light_enhancement_preprocessing.py new file mode 100644 index 00000000..91209e08 --- /dev/null +++ b/hailo_model_zoo/core/preprocessing/low_light_enhancement_preprocessing.py @@ -0,0 +1,30 @@ +import tensorflow as tf + + +def zero_dce(image, image_info, height, width, **kwargs): + """ + preprocessing function for zero_dce + 1. resize the images by taking a central crop with padding + Args: + image: a tensor with the low-light image (network input) + height: the required height of the image that will be the low-light enhancement net input + width: the required width of the image that will be the low-light enhancement net input + Returns: + ll_image resized - the low-light input to the network + lle_image resized - the low-light imhanced image for performance analysis + """ + if width and height: + image = tf.expand_dims(image, axis=0) + image = tf.image.resize_with_crop_or_pad(image, height, width) + image = tf.cast(tf.squeeze(image, axis=0), tf.float32) + + if image_info: + image_info['img_orig'] = image + enhanced_img = image_info.get('ll_enhanced_img') + if enhanced_img is not None: + enhanced_img = tf.divide(tf.cast(enhanced_img, tf.float32), 255.0) + enhanced_img = tf.expand_dims(enhanced_img, axis=0) + enhanced_img = tf.image.resize_with_crop_or_pad(enhanced_img, height, width) + enhanced_img = tf.squeeze(enhanced_img, axis=0) + image_info['enhanced_img_processed'] = tf.cast(enhanced_img, tf.float32) + return image, image_info diff --git a/hailo_model_zoo/core/preprocessing/preprocessing_factory.py b/hailo_model_zoo/core/preprocessing/preprocessing_factory.py index 98d33090..107e2ffe 100644 --- a/hailo_model_zoo/core/preprocessing/preprocessing_factory.py +++ b/hailo_model_zoo/core/preprocessing/preprocessing_factory.py @@ -13,6 +13,8 @@ from hailo_model_zoo.core.preprocessing import fast_depth_preprocessing from hailo_model_zoo.core.preprocessing import person_reid_preprocessing from hailo_model_zoo.core.preprocessing import mspn_preprocessing +from hailo_model_zoo.core.preprocessing import low_light_enhancement_preprocessing +from hailo_model_zoo.core.preprocessing import stereonet_preprocessing def convert_rgb_to_yuv(image): @@ -33,6 +35,25 @@ def convert_yuv_to_yuy2(image): return yuy2_img +def convert_yuv_to_nv12(image): + h, w, _ = image.shape + y_img = image[..., 0] + y = tf.reshape(y_img, (2 * h, w // 2)) + u = image[..., 1] + v = image[..., 2] + u_subsample = tf.expand_dims(u[::2, ::2], axis=-1) + v_subsample = tf.expand_dims(v[::2, ::2], axis=-1) + uv = tf.stack([u_subsample, v_subsample], axis=-1) + uv = tf.reshape(uv, (h, w // 2)) + return tf.reshape(tf.concat([y, uv], axis=0), (h // 2, 3 * w, 1)) + + +def convert_rgb_to_rgbx(image): + h, w, _ = image.shape + new_channel = tf.zeros((h, w, 1)) + return tf.concat([image, new_channel], axis=-1) + + def image_resize(image, shape): image = tf.expand_dims(image, 0) image = tf.image.resize(image, tuple(shape), method='bilinear') @@ -81,6 +102,7 @@ def get_preprocessing(name, height, width, normalization_params, **kwargs): 'face_ssd': detection_preprocessing.face_ssd, 'sr_resnet': super_resolution_preprocessing.resnet, 'srgan': super_resolution_preprocessing.srgan, + 'zero_dce': low_light_enhancement_preprocessing.zero_dce, 'openpose': pose_preprocessing.openpose_tf_preproc, 'centerpose': centerpose_preprocessing.centerpose_preprocessing, 'mono_depth': mono_depth_estimation_preprocessing.mono_depth_2, @@ -92,6 +114,7 @@ def get_preprocessing(name, height, width, normalization_params, **kwargs): 'resmlp': classification_preprocessing.resmlp, 'fast_depth': fast_depth_preprocessing.fast_depth, 'lprnet': classification_preprocessing.lprnet, + 'clip': classification_preprocessing.clip, 'person_reid': person_reid_preprocessing.market1501, 'mspn': mspn_preprocessing.mspn, 'vit': classification_preprocessing.vit_tiny, @@ -99,12 +122,15 @@ def get_preprocessing(name, height, width, normalization_params, **kwargs): 'retinanet_resnext50': detection_preprocessing.retinanet_resnext50, 'sparseinst': segmentation_preprocessing.sparseinst, 'resnet_pruned': classification_preprocessing.resnet_pruned, + 'stereonet': stereonet_preprocessing.stereonet } if name not in preprocessing_fn_map: raise ValueError('Preprocessing name [%s] was not recognized' % name) flip = kwargs.pop('flip', False) yuv2rgb = kwargs.pop('yuv2rgb', False) yuy2 = kwargs.pop('yuy2', False) + nv12 = kwargs.pop('nv12', False) + rgbx = kwargs.pop('rgbx', False) input_resize = kwargs.pop('input_resize', {}) if flip: height, width = width, height @@ -119,5 +145,9 @@ def preprocessing_fn(image, image_info=None): image = convert_rgb_to_yuv(image) if yuy2: image = convert_yuv_to_yuy2(image) + if nv12: + image = convert_yuv_to_nv12(image) + if rgbx: + image = convert_rgb_to_rgbx(image) return image, image_info return preprocessing_fn diff --git a/hailo_model_zoo/core/preprocessing/segmentation_preprocessing.py b/hailo_model_zoo/core/preprocessing/segmentation_preprocessing.py index f7cb1e43..ada43a62 100644 --- a/hailo_model_zoo/core/preprocessing/segmentation_preprocessing.py +++ b/hailo_model_zoo/core/preprocessing/segmentation_preprocessing.py @@ -69,6 +69,7 @@ def sparseinst(image, image_info=None, height=None, width=None, max_pad=MAX_PADD [0, 0]] image_padded = tf.squeeze(tf.pad(image_resized_ar, paddings, mode="CONSTANT", constant_values=0)) image_resized = tf.cast(image_padded, tf.float32) + image_resized.set_shape((height, width, 3)) if image_info: image_info['resized_height'] = tf.cast(newh, tf.int32) image_info['resized_width'] = tf.cast(neww, tf.int32) diff --git a/hailo_model_zoo/core/preprocessing/stereonet_preprocessing.py b/hailo_model_zoo/core/preprocessing/stereonet_preprocessing.py new file mode 100644 index 00000000..0ada01c1 --- /dev/null +++ b/hailo_model_zoo/core/preprocessing/stereonet_preprocessing.py @@ -0,0 +1,18 @@ +from __future__ import division +import tensorflow as tf + + +def stereonet(images, image_info=None, output_height=None, output_width=None, flip=None, **kwargs): + image_l = images['image_l'] + image_r = images['image_r'] + height_l = image_info['height_l'] + width_l = image_info['width_l'] + height_r = image_info['height_r'] + width_r = image_info['width_r'] + crop_h, crop_w, _ = kwargs['input_shape'] + image_l = tf.image.crop_to_bounding_box(image_l, height_l - crop_h, width_l - crop_w, crop_h, crop_w) + image_r = tf.image.crop_to_bounding_box(image_r, height_r - crop_h, width_r - crop_w, crop_h, crop_w) + image = {'stereonet/input_layer1': image_l, 'stereonet/input_layer2': image_r} + image_info['gt_l'] = tf.image.crop_to_bounding_box( + image_info['gt_l'], height_l - crop_h, width_l - crop_w, crop_h, crop_w) + return image, image_info diff --git a/hailo_model_zoo/datasets/create_cifar100_tfrecord.py b/hailo_model_zoo/datasets/create_cifar100_tfrecord.py new file mode 100755 index 00000000..697337d4 --- /dev/null +++ b/hailo_model_zoo/datasets/create_cifar100_tfrecord.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python + +import argparse +import numpy as np +import tensorflow as tf +from tqdm import tqdm +import clip + +from hailo_model_zoo.utils import path_resolver + + +CLASSES = ['apple', 'aquarium fish', 'baby', 'bear', 'beaver', 'bed', 'bee', 'beetle', 'bicycle', + 'bottle', 'bowl', 'boy', 'bridge', 'bus', 'butterfly', 'camel', 'can', 'castle', + 'caterpillar', 'cattle', 'chair', 'chimpanzee', 'clock', 'cloud', 'cockroach', + 'couch', 'crab', 'crocodile', 'cup', 'dinosaur', 'dolphin', 'elephant', 'flatfish', + 'forest', 'fox', 'girl', 'hamster', 'house', 'kangaroo', 'keyboard', 'lamp', 'lawn mower', + 'leopard', 'lion', 'lizard', 'lobster', 'man', 'maple tree', 'motorcycle', 'mountain', + 'mouse', 'mushroom', 'oak tree', 'orange', 'orchid', 'otter', 'palm tree', 'pear', + 'pickup truck', 'pine tree', 'plain', 'plate', 'poppy', 'porcupine', 'possum', + 'rabbit', 'raccoon', 'ray', 'road', 'rocket', 'rose', 'sea', 'seal', 'shark', 'shrew', + 'skunk', 'skyscraper', 'snail', 'snake', 'spider', 'squirrel', 'streetcar', 'sunflower', + 'sweet pepper', 'table', 'tank', 'telephone', 'television', 'tiger', 'tractor', 'train', + 'trout', 'tulip', 'turtle', 'wardrobe', 'whale', 'willow tree', 'wolf', 'woman', 'worm'] +TEMPLATES = ['a photo of a {}.', + 'a blurry photo of a {}.', + 'a black and white photo of a {}.', + 'a low contrast photo of a {}.', + 'a high contrast photo of a {}.', + 'a bad photo of a {}.', + 'a good photo of a {}.', + 'a photo of a small {}.', + 'a photo of a big {}.', + 'a photo of the {}.', + 'a blurry photo of the {}.', + 'a black and white photo of the {}.', + 'a low contrast photo of the {}.', + 'a high contrast photo of the {}.', + 'a bad photo of the {}.', + 'a good photo of the {}.', + 'a photo of the small {}.', + 'a photo of the big {}.'] +TF_RECORD_TYPE = ['val', 'calib'] +CLASS_TOKEN_LOC = {"RN50": 'models_files/cifar100/2023-03-09/class_token_resnet50.npy', + "ViT-B/16": 'models_files/cifar100/2023-03-09/class_token_vit_b_16.npy', + "ViT-B/32": 'models_files/cifar100/2023-03-09/class_token_vit_b_32.npy'} +TF_RECORD_LOC = {'val': 'models_files/cifar100/2023-03-09/cifar100_val.tfrecord', + 'calib': 'models_files/cifar100/2023-03-09/cifar100_calib.tfrecord'} + + +def _generate_classe_tokens(model, classnames, templates): + zeroshot_weights = [] + for classname in tqdm(classnames): + texts = [template.format(classname) for template in templates] # format with class + texts = clip.tokenize(texts).cpu() # tokenize + class_embeddings = model.encode_text(texts) # embed with text encoder + class_embeddings /= class_embeddings.norm(dim=-1, keepdim=True) + class_embeddings = class_embeddings.mean(dim=0) + class_embeddings = class_embeddings.detach().cpu().numpy() + zeroshot_weights.append(class_embeddings) + zeroshot_weights = np.stack(zeroshot_weights, axis=0) + return zeroshot_weights + + +def _int64_feature(values): + if not isinstance(values, (tuple, list)): + values = [values] + return tf.train.Feature(int64_list=tf.train.Int64List(value=values)) + + +def _bytes_feature(values): + if not isinstance(values, (tuple, list)): + values = [values] + return tf.train.Feature(bytes_list=tf.train.BytesList(value=values)) + + +def _create_tfrecord(name, images, labels): + """Loop over all the images in filenames and create the TFRecord + """ + tfrecords_filename = path_resolver.resolve_data_path(TF_RECORD_LOC[name]) + (tfrecords_filename.parent).mkdir(parents=True, exist_ok=True) + + progress_bar = tqdm(len(images)) + with tf.io.TFRecordWriter(str(tfrecords_filename)) as writer: + for i in range(len(images)): + progress_bar.update(1) + img_numpy = images[i] + height = img_numpy.shape[0] + width = img_numpy.shape[1] + example = tf.train.Example(features=tf.train.Features(feature={ + 'height': _int64_feature(height), + 'width': _int64_feature(width), + 'label_index': _int64_feature(labels[i][0]), + 'image_numpy': _bytes_feature(np.array(img_numpy, np.uint8).tostring())})) + writer.write(example.SerializeToString()) + return i + 1 + + +def _create_class_tokens(model_name): + model, _ = clip.load(model_name) + tfrecords_filename = path_resolver.resolve_data_path(CLASS_TOKEN_LOC[model_name]) + (tfrecords_filename.parent).mkdir(parents=True, exist_ok=True) + class_tokens = _generate_classe_tokens(model, CLASSES, TEMPLATES) + np.save(tfrecords_filename, class_tokens) + print(f'Class tokens are saved in {tfrecords_filename}') + + +def run(type, model_name): + _create_class_tokens(model_name) + (x_train, y_train), (x_test, y_test) = tf.keras.datasets.cifar100.load_data() + if type == 'calib': + images_num = _create_tfrecord(type, x_train, y_train) + elif type == 'val': + images_num = _create_tfrecord(type, x_test, y_test) + else: + raise Exception(f"TFrecord type {type} is not supported.") + print(f'Done converting {images_num} images') + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('type', help="TFRecord of which dataset to create", type=str, + choices=TF_RECORD_TYPE) + parser.add_argument('--model', help="CLIP model to use", type=str, default='RN50', + choices=list(CLASS_TOKEN_LOC.keys())) + args = parser.parse_args() + run(args.type, args.model) + +""" +----------------------------------------------------------------- +CMD used to create a cifar100.tfrecord of the CIFAR100 dataset: +python create_cifat100_tfrecord.py +----------------------------------------------------------------- +""" diff --git a/hailo_model_zoo/datasets/create_lol_tfrecord.py b/hailo_model_zoo/datasets/create_lol_tfrecord.py new file mode 100755 index 00000000..976fd766 --- /dev/null +++ b/hailo_model_zoo/datasets/create_lol_tfrecord.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python + +import os +import argparse +import tensorflow as tf +import PIL +import numpy as np +from pathlib import Path +import tempfile +import zipfile +from datetime import datetime +from tqdm import tqdm + +from hailo_model_zoo.utils import path_resolver +from hailo_model_zoo.utils.downloader import download_from_drive + +LOL_DATASET_PAPER = "https://arxiv.org/abs/1808.04560v1" +DESCRIPTION = "Create tfrecord for Low Light Enhancement task from LOL dataset (low and high light images).\n" +\ + f"More info in the paper: {LOL_DATASET_PAPER}\n\n" +\ + "Example cmd to create a val_set_lol.tfrecord:\n\n" +\ + "\tpython create_lol_tfrecord.py val --ll your/lowlight/images/directory/ " +\ + "--lle your/highlight/images/directory/" + +TF_RECORD_TYPE = 'val', 'calib' +TF_RECORD_LOC = {'val': 'models_files/LowLightEnhancement/LOL/{}/hailo_val_set_lol.tfrecord', + 'calib': 'models_files/LowLightEnhancement/LOL/{}/hailo_calib_set_lol.tfrecord'} + +DOWNLOAD_URL = "https://drive.google.com/uc?export=download&id=157bjO1_cFuSd0HWDUuAmcHRJDVyWpOxB&authuser=0" +LOL_ZIP_NAME = 'LOLdataset.zip' + + +def _int64_feature(values): + if not isinstance(values, (tuple, list)): + values = [values] + return tf.train.Feature(int64_list=tf.train.Int64List(value=values)) + + +def _bytes_feature(values): + if not isinstance(values, (tuple, list)): + values = [values] + return tf.train.Feature(bytes_list=tf.train.BytesList(value=values)) + + +def create_tf_example(img_path, ll_enhanced_dir): + ll_image = PIL.Image.open(img_path) + ll_width, ll_height = ll_image.size + ll_filename = os.path.basename(img_path) + ll_enhanced_image = PIL.Image.open(os.path.join(ll_enhanced_dir, ll_filename)) + + feature_dict = { + 'height': _int64_feature(ll_height), + 'width': _int64_feature(ll_width), + 'image_name': _bytes_feature(ll_filename.encode('utf8')), + 'll_img': _bytes_feature(np.array(ll_image, np.uint8).tobytes()), + 'll_enhanced_img': _bytes_feature(np.array(ll_enhanced_image, np.uint8).tobytes()), + 'format': _bytes_feature('png'.encode('utf8')), + } + example = tf.train.Example(features=tf.train.Features(feature=feature_dict)) + return example + + +def _download_dataset(dataset_dir): + if dataset_dir.is_dir(): + print(f"{dataset_dir} already exists, skipping download.") + return + dataset_dir.mkdir() + with tempfile.NamedTemporaryFile() as outfile: + download_from_drive(DOWNLOAD_URL, outfile, desc=LOL_ZIP_NAME) + with zipfile.ZipFile(outfile, 'r') as zip_ref: + zip_ref.extractall(str(dataset_dir)) + print(f"Downloaded dataset to {dataset_dir}") + + +def _create_tf_record(ll_dir, ll_enhanced_dir, name, num_images=None): + current_date = datetime.now().strftime('%Y-%m-%d') + tfrecord_filename = path_resolver.resolve_data_path(TF_RECORD_LOC[name].format(current_date)) + (tfrecord_filename.parent).mkdir(parents=True, exist_ok=True) + num_images = num_images if num_images is not None else (128 if args.type == 'calib' else 1024) + + if ll_dir is None or ll_enhanced_dir is None: + if ll_dir is not None or ll_enhanced_dir is not None: + raise ValueError('Please use ll and lle arguments together.') + dataset_path = Path('lol_dataset') + _download_dataset(dataset_path) + + if name == 'val': + ll_dir = dataset_path.joinpath("eval15", "low") + ll_enhanced_dir = dataset_path.joinpath("eval15", "high") + else: # 'calib' + ll_dir = dataset_path.joinpath("our485", "low") + ll_enhanced_dir = dataset_path.joinpath("our485", "high") + + writer = tf.io.TFRecordWriter(str(tfrecord_filename)) + images = [os.path.join(dp, f) for dp, dn, fn in os.walk(os.path.expanduser(ll_dir)) for f in fn if f[-3:] == 'png'] + images = images[:num_images] + for i, img_path in enumerate(tqdm(images, desc="Converting images")): + try: + tf_example = create_tf_example(img_path, ll_enhanced_dir) + except (FileNotFoundError, TypeError): + continue + writer.write(tf_example.SerializeToString()) + if i == num_images: + break + writer.close() + i = i if i == num_images else i + 1 + print(f'Done converting {i} images.\nSaved to: {tfrecord_filename}') + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=DESCRIPTION, formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument('type', help='which tf-record to create {}'.format(TF_RECORD_TYPE)) + parser.add_argument('--ll', help="low light images directory", type=str, default=None) + parser.add_argument('--lle', help="low light enhanced images directory", type=str, default=None) + parser.add_argument('--num-images', type=int, default=None, help='Limit num images') + + args = parser.parse_args() + assert args.type in TF_RECORD_TYPE, \ + 'Please provide which kind of tfrecord to create {}'.format(TF_RECORD_TYPE) + tot_images = _create_tf_record(args.ll, args.lle, args.type, num_images=args.num_images) diff --git a/hailo_model_zoo/main.py b/hailo_model_zoo/main.py index 2889c035..fdcf8f2d 100755 --- a/hailo_model_zoo/main.py +++ b/hailo_model_zoo/main.py @@ -30,7 +30,9 @@ def _make_parsing_base(): parsing_base_parser.add_argument( '--ckpt', type=str, default=None, dest='ckpt_path', help='Path to onnx or ckpt to use for parsing. By default using the model cache location') - + parsing_base_parser.add_argument( + '--hw-arch', type=str, default='hailo8', metavar='', choices=['hailo8', 'hailo8l', 'hailo15h'], + help='Which hw arch to run: hailo8 / hailo8l/ hailo15h. By default using hailo8.') parsing_base_parser.set_defaults(results_dir=Path('./')) return parsing_base_parser @@ -51,9 +53,7 @@ def _make_optimization_base(): optimization_base_parser.add_argument( '--performance', action='store_true', help='Enable flag for benchmark performance') - optimization_base_parser.add_argument( - '--hw-arch', type=str, default='hailo8', metavar='', choices=['hailo8', 'hailo8l'], - help='Which hw arch to run: hailo8 / hailo8l') + return optimization_base_parser diff --git a/hailo_model_zoo/main_driver.py b/hailo_model_zoo/main_driver.py index bc646a24..7a922dd4 100644 --- a/hailo_model_zoo/main_driver.py +++ b/hailo_model_zoo/main_driver.py @@ -32,13 +32,15 @@ def _ensure_performance(model_name, model_script, performance, logger): if performance and model_script: if model_script.parent.name == "base": logger.info(f'Using base alls script found in {model_script} because there is no performance alls') + if model_script.parent.name == "generic": + logger.info(f'Using generic alls script found in {model_script} because there is no specific hardware alls') elif model_script.parent.name != "performance" and model_name in get_network_peformance(): logger.info('Using alls script {model_script}') -def _extract_model_script_path(networks_alls_script, model_script_path, performance): +def _extract_model_script_path(networks_alls_script, model_script_path, hw_arch, performance): return Path(model_script_path) if model_script_path \ - else resolve_alls_path(networks_alls_script, performance=performance) + else resolve_alls_path(networks_alls_script, hw_arch=hw_arch, performance=performance) def _ensure_compiled(runner, logger, args, network_info): @@ -60,6 +62,7 @@ def _ensure_optimized(runner, logger, args, network_info): return model_script = _extract_model_script_path(network_info.paths.alls_script, args.model_script_path, + args.hw_arch, args.performance) _ensure_performance(network_info.network.network_name, model_script, args.performance, logger) optimize_model(runner, logger, network_info, args.calib_path, args.results_dir, @@ -99,7 +102,8 @@ def _ensure_runnable_state_tf1(args, logger, network_info, runner, target): # compatible to the performance model script model_script = _extract_model_script_path(network_info.paths.alls_script, args.model_script_path, - False) + args.hw_arch, + performance=False) runner.load_model_script(model_script) runner.optimize_full_precision() @@ -136,8 +140,8 @@ def _ensure_runnable_state_tf2(args, logger, network_info, runner, target): # compatible to the performance model script model_script = _extract_model_script_path(network_info.paths.alls_script, args.model_script_path, + args.hw_arch, False) - runner.load_model_script(model_script) runner.optimize_full_precision() configure_hef_tf2(runner, args.hef_path) @@ -170,7 +174,7 @@ def parse(args): logger.info(f'Start run for network {model_name} ...') logger.info('Initializing the runner...') - runner = ClientRunner() + runner = ClientRunner(hw_arch=args.hw_arch) parse_model(runner, network_info, ckpt_path=args.ckpt_path, results_dir=args.results_dir, logger=logger) @@ -191,6 +195,7 @@ def optimize(args): model_script = _extract_model_script_path(network_info.paths.alls_script, args.model_script_path, + args.hw_arch, args.performance) _ensure_performance(model_name, model_script, args.performance, logger) optimize_model(runner, logger, network_info, args.calib_path, args.results_dir, @@ -208,7 +213,8 @@ def compile(args): _ensure_optimized(runner, logger, args, network_info) - model_script = _extract_model_script_path(network_info.paths.alls_script, args.model_script_path, args.performance) + model_script = _extract_model_script_path(network_info.paths.alls_script, + args.model_script_path, args.hw_arch, args.performance) _ensure_performance(model_name, model_script, args.performance, logger) compile_model(runner, network_info, args.results_dir, model_script) @@ -236,6 +242,7 @@ def profile(args): if runner.state == States.HAILO_MODEL: model_script = _extract_model_script_path(network_info.paths.alls_script, args.model_script_path, + args.hw_arch, args.performance) _ensure_performance(model_name, model_script, args.performance, logger) runner.load_model_script(model_script) @@ -243,7 +250,8 @@ def profile(args): else: # Optimize the model so profile_hn_model could compile & profile it _ensure_optimized(runner, logger, args, network_info) - model_script = _extract_model_script_path(network_info.paths.alls_script, args.model_script_path, args.performance) + model_script = _extract_model_script_path(network_info.paths.alls_script, + args.model_script_path, args.hw_arch, args.performance) alls_script_path = model_script \ if profile_mode is not ProfilerModes.PRE_PLACEMENT else None _ensure_performance(model_name, alls_script_path, args.performance, logger) @@ -251,14 +259,14 @@ def profile(args): stats, csv_data, latency_data, accuracy_data = runner.profile(profiling_mode=profile_mode, should_use_logical_layers=True, hef_filename=args.hef_path) - mem_file = io.StringIO() outpath = args.results_dir / f'{model_name}.html' + hn_model = runner._sdk_backend.get_modified_hn_model() report_generator = ReactReportGenerator(mem_file=mem_file, accuracy_data=accuracy_data, csv_data=csv_data, latency_data=latency_data, runtime_data=latency_data["runtime_data"], out_path=outpath, - stats=stats, hw_arch="hailo8") + stats=stats, hn_model=hn_model) csv_data = report_generator.create_report(should_open_web_browser=False) logger.info(f'Profiler report generated in {outpath}') @@ -292,6 +300,9 @@ def evaluate(args): raise ValueError( "Cannot run evaluation without dataset. use --data-path to provide external dataset.") model_name = network_info.network.network_name + if args.hw_arch == "hailo15h" and args.target == "hailo8": + raise ValueError( + "Cannot run hailo15h compiled hef on hailo8.") logger.info(f'Start run for network {model_name} ...') logger.info('Initializing the runner...') diff --git a/hailo_model_zoo/utils/constants.py b/hailo_model_zoo/utils/constants.py index 5c2f8f9d..702516f8 100644 --- a/hailo_model_zoo/utils/constants.py +++ b/hailo_model_zoo/utils/constants.py @@ -3,12 +3,17 @@ PLATFORM_AVAILABLE = True except ModuleNotFoundError: PLATFORM_AVAILABLE = False + + PROFILER_MODE_NAMES = {'pre_placement', 'post_placement'} + TARGETS = [ 'hailo8', 'full_precision', 'emulator', ] + + DEVICE_NAMES = set() if PLATFORM_AVAILABLE: try: diff --git a/hailo_model_zoo/utils/numpy_utils.py b/hailo_model_zoo/utils/numpy_utils.py index 60a924be..812ef0e6 100644 --- a/hailo_model_zoo/utils/numpy_utils.py +++ b/hailo_model_zoo/utils/numpy_utils.py @@ -12,5 +12,7 @@ def to_numpy(tensor, *, decode=False): return result if isinstance(tensor, str): return tensor + if isinstance(tensor, dict): + return {k: v.numpy() if hasattr(v, 'numpy') else v for k, v in tensor.items()} return tf.nest.map_structure(to_numpy, tensor) diff --git a/hailo_model_zoo/utils/path_resolver.py b/hailo_model_zoo/utils/path_resolver.py index 37c235eb..2f8cd120 100644 --- a/hailo_model_zoo/utils/path_resolver.py +++ b/hailo_model_zoo/utils/path_resolver.py @@ -19,9 +19,11 @@ def resolve_alls_path(path): alls_path = ALLS_DIR / path if alls_path.exists(): return alls_path - else: - alls_path = ALLS_DIR / Path("base") / alls_path.name - return alls_path + elif (alls_path.parents[1] / Path("base") / alls_path.name).exists(): + return alls_path.parents[1] / Path("base") / alls_path.name + elif (ALLS_DIR / Path('generic') / alls_path.name).exists(): + return ALLS_DIR / Path('generic') / alls_path.name + raise Exception("no alls found for requested hw_arch") def resolve_cfg_path(path): diff --git a/setup.py b/setup.py index 19135a08..624b3c52 100755 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ def main(): 'detection-tools==0.3', 'scikit-image==0.19.3'] - model_zoo_version = "2.7.0" + model_zoo_version = "2.8.0" package_data = { "hailo_model_zoo": [ diff --git a/training/fcn/Dockerfile b/training/fcn/Dockerfile index c05da4ac..eb7dcbad 100644 --- a/training/fcn/Dockerfile +++ b/training/fcn/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update && \ ARG repo=https://github.com/hailo-ai/mmsegmentation.git RUN git clone $repo && \ cd mmsegmentation && \ + git checkout Hailo-0.1 && \ pip install mmcv-full==1.4.5 onnxruntime==1.13.1 && \ pip install -e . WORKDIR /workspace/mmsegmentation diff --git a/training/mspn/Dockerfile b/training/mspn/Dockerfile index 00370aa4..3b25d749 100644 --- a/training/mspn/Dockerfile +++ b/training/mspn/Dockerfile @@ -10,7 +10,7 @@ RUN pip install mmcv-full==1.6.0 && \ git clone https://github.com/hailo-ai/mmpose.git && \ cd mmpose && pip install -e . && \ mkdir -p data/coco/annotations && mkdir pretrained && \ - pip install tensorboard==2.11.2 onnxruntime==1.13.1 onnx-simplifier==0.4.13 netron==6.4.7 ipdb==0.13.11 && \ + pip install tensorboard==2.11.2 onnxruntime==1.13.1 onnx-simplifier==0.4.13 ipdb==0.13.11 && \ wget -P ./data/coco/ https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/SinglePersonPoseEstimation/mspn_regnetx_800mf/pretrained/2022-07-12/coco_gt_as_results.json && \ wget -P ./pretrained https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/SinglePersonPoseEstimation/mspn_regnetx_800mf/pretrained/2022-07-12/best_AP_epoch_310.pth diff --git a/training/nanodet/README.rst b/training/nanodet/README.rst index 562bf9c9..c259c276 100644 --- a/training/nanodet/README.rst +++ b/training/nanodet/README.rst @@ -117,7 +117,6 @@ Training and exporting to ONNX :name:validation

-      pip install -U onnx onnxruntime
       python tools/export_onnx.py --cfg_path ./config/legacy_v0.x_configs/RepVGG/nanodet-RepVGG-A0_416.yml --model_path /workspace/nanodet/workspace/RepVGG-A0-416/model_last.ckpt
       
diff --git a/training/ssd/README.rst b/training/ssd/README.rst index d41ddb1c..0f050d1b 100644 --- a/training/ssd/README.rst +++ b/training/ssd/README.rst @@ -1,6 +1,7 @@ =========================== SSD-Mobilenet-V1 Retraining =========================== +**Deprecation Warning: This retraining image will be deprecated in next release.** * To learn more about ssd look `here `_ @@ -174,4 +175,4 @@ Choose the corresponding YAML from our networks configuration directory, i.e. `` - Update the ``mobilenet_ssd_nms_postprocess_config.json`` file to match the updated NMS post-process configuration. - Run the command from above. - More details about YAML files are presented `here <../../docs/YAML.rst>`_. \ No newline at end of file + More details about YAML files are presented `here <../../docs/YAML.rst>`_. diff --git a/training/yolov4/Dockerfile b/training/yolov4/Dockerfile index 31726a53..23707be7 100644 --- a/training/yolov4/Dockerfile +++ b/training/yolov4/Dockerfile @@ -21,6 +21,4 @@ RUN sed -i "1s/GPU=0/GPU=1/" Makefile && \ RUN make RUN cd /workspace/darknet && wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.conv.29 -q && \ - wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -q && \ - gdown https://drive.google.com/uc?id=1C4w_2loEpi-MznqMgKo16oZD7BcvgsCF -O ./cfg/yolov4-leaky.cfg -q && \ - gdown https://drive.google.com/uc?id=1dW-Sd70aTmXuFvYspiY85SwWdn0cr447 -O yolov4-leaky.weights -q + wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -q diff --git a/training/yolov4/README.rst b/training/yolov4/README.rst index 0b4f0a7e..a8531285 100644 --- a/training/yolov4/README.rst +++ b/training/yolov4/README.rst @@ -84,7 +84,7 @@ Training and exporting to ONNX :name:validation - ./darknet detector train data/obj.data cfg/yolov4-leaky.cfg yolov4-leaky.weights -map -clear + ./darknet detector train data/obj.data cfg/yolov4-leaky.cfg -map -clear | Final trained weights will be available in ``backup/`` directory. diff --git a/training/yolov5/Dockerfile b/training/yolov5/Dockerfile index bbca70bf..2e1c7a42 100644 --- a/training/yolov5/Dockerfile +++ b/training/yolov5/Dockerfile @@ -5,7 +5,7 @@ FROM $base_image ENV DEBIAN_FRONTEND=noninteractive, TZ=$timezone RUN apt-get update && \ - apt-get -y --no-install-recommends install git build-essential python3-opencv wget vim + apt-get -y --no-install-recommends install git build-essential python3-opencv wget vim sudo RUN git clone https://github.com/hailo-ai/yolov5.git --branch v2.0.1 && \ cd yolov5 && \ @@ -21,3 +21,13 @@ RUN cd /workspace/yolov5 && wget https://github.com/ultralytics/yolov5/releases/ RUN cd /workspace/yolov5 && wget https://github.com/ultralytics/yolov5/releases/download/v2.0/yolov5l.pt -q RUN cd /workspace/yolov5 && wget https://github.com/ultralytics/yolov5/releases/download/v2.0/yolov5x.pt -q RUN cd /workspace/yolov5 && wget https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ObjectDetection/Detection-COCO/yolo/yolov5m/pretrained/2022-04-19/yolov5m_wo_spp.pt -q + +ARG user=hailo +ARG group=hailo +ARG uid=1000 +ARG gid=1000 + +RUN groupadd --gid $gid $group && \ + adduser --uid $uid --gid $gid --shell /bin/bash --disabled-password --gecos "" $user && \ + chmod u+w /etc/sudoers && echo "$user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && chmod -w /etc/sudoers && \ + chown -R $user:$group /workspace \ No newline at end of file diff --git a/training/yolov8/Dockerfile b/training/yolov8/Dockerfile new file mode 100644 index 00000000..f8cb52ac --- /dev/null +++ b/training/yolov8/Dockerfile @@ -0,0 +1,27 @@ +ARG base_image=pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime +ARG timezone +FROM $base_image + +ENV DEBIAN_FRONTEND=noninteractive, TZ=$timezone + +RUN apt-get update && \ + apt-get -y --no-install-recommends install git build-essential python3-opencv wget vim sudo + +RUN git clone https://github.com/hailo-ai/ultralytics.git && \ + cd ultralytics && \ + pip install --upgrade pip && \ + pip install -r requirements.txt && \ + pip install -e . + +ENV PYTHONPATH=/workspace/ultralytics +WORKDIR /workspace/ultralytics + +ARG user=hailo +ARG group=hailo +ARG uid=1000 +ARG gid=1000 + +RUN groupadd --gid $gid $group && \ + adduser --uid $uid --gid $gid --shell /bin/bash --disabled-password --gecos "" $user && \ + chmod u+w /etc/sudoers && echo "$user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && chmod -w /etc/sudoers && \ + chown -R $user:$group /workspace \ No newline at end of file diff --git a/training/yolov8/README.rst b/training/yolov8/README.rst new file mode 100644 index 00000000..6c896909 --- /dev/null +++ b/training/yolov8/README.rst @@ -0,0 +1,127 @@ +================= +YOLOv8 Retraining +================= + +* To learn more about yolov8 look `here `_ + +---------- + +Prerequisites +------------- + +* docker (\ `installation instructions `_\ ) +* nvidia-docker2 (\ `installation instructions `_\ ) + + +**NOTE:** In case you are using the Hailo Software Suite docker, make sure to run all of the following instructions outside of that docker. + +Environment Preparations +------------------------ + + +#. | Build the docker image: + + .. raw:: html + :name:validation + +

+      cd hailo_model_zoo/training/yolov8
+      docker build --build-arg timezone=`cat /etc/timezone` -t yolov8:v0 .
+      
+ + | the following optional arguments can be passed via --build-arg: + + * ``timezone`` - a string for setting up timezone. E.g. "Asia/Jerusalem" + * ``user`` - username for a local non-root user. Defaults to 'hailo'. + * ``group`` - default group for a local non-root user. Defaults to 'hailo'. + * ``uid`` - user id for a local non-root user. + * ``gid`` - group id for a local non-root user. + + | * This command will build the docker image with the necessary requirements using the Dockerfile exists in yolov8 directory. + + +#. | Start your docker: + + .. raw:: html + :name:validation + + + docker run --name "your_docker_name" -it --gpus all --ipc=host -v /path/to/local/data/dir:/path/to/docker/data/dir yolov8:v0 + + + * ``docker run`` create a new docker container. + * ``--name `` name for your container. + * ``-it`` runs the command interactively. + * ``--gpus all`` allows access to all GPUs. + * ``--ipc=host`` sets the IPC mode for the container. + * ``-v /path/to/local/data/dir:/path/to/docker/data/dir`` maps ``/path/to/local/data/dir`` from the host to the container. You can use this command multiple times to mount multiple directories. + * ``yolov8:v0`` the name of the docker image. + +Training and exporting to ONNX +------------------------------ + + +#. | Train your model: + | Once the docker is started, you can start training your model. + + * | Prepare your custom dataset - Follow the steps described `here `_ in order to create: + + * ``dataset.yaml`` configuration file + * Labels - each image should have labels in YOLO format with corresponding txt file for each image. + * Make sure to include number of classes field in the yaml, for example: ``nc: 80`` + + * | Start training - The following command is an example for training a *yolov8s* model. + + .. raw:: html + :name:validation + + + yolo detect train data=coco128.yaml model=yolov8s.pt name=retrain_yolov8s epochs=100 batch=16 + + + * ``yolov8s.pt`` - pretrained weights. The pretrained weights for *yolov8n*\ , *yolov8s*\ , *yolov8m*\ , *yolov8l* and *yolov8x* will be downloaded to your working directory when running this command. + * ``coco128.yaml`` - example file for data.yaml file. Can be found at ultralytics/ultralytics/datasets. + * ``retrain_yolov8s`` - the new weights will be saved at ultralytics/runs/detect/retrain_yolov8s. + * ``epochs`` - number of epochs to run. default to 100. + * ``batch`` - number of images per batch. default to 16. + + **NOTE:**\ more configurable parameters can be found at https://docs.ultralytics.com/modes/train/ + +#. | Export to ONNX: + + | In order to export your trained YOLOv8 model to ONNX run the following script: + + .. raw:: html + :name:validation + + + yolo export model=/path/to/trained/best.pt imgsz=640 format=onnx opset=11 # export at 640x640 + + + **NOTE:**\ more configurable parameters can be found at https://docs.ultralytics.com/modes/export/ + +---- + +Compile the Model using Hailo Model Zoo +--------------------------------------- + +| You can generate an HEF file for inference on Hailo-8 from your trained ONNX model. +| In order to do so you need a working model-zoo environment. +| Choose the corresponding YAML from our networks configuration directory, i.e. ``hailo_model_zoo/cfg/networks/yolov8s.yaml``\ , and run compilation using the model zoo: + +.. raw:: html + :name:validation + + + hailomz compile --ckpt yolov8s.onnx --calib-path /path/to/calibration/imgs/dir/ --yaml path/to/yolov8s.yaml + + +* | ``--ckpt`` - path to your ONNX file. +* | ``--calib-path`` - path to a directory with your calibration images in JPEG/png format +* | ``--yaml`` - path to your configuration YAML file. +* | The model zoo will take care of adding the input normalization to be part of the model. + +.. note:: + - Make sure to also update ``preprocessing.input_shape`` field on `yolo.yaml `_, if it was changed on retraining. + + More details about YAML files are presented `here <../../docs/YAML.rst>`_. \ No newline at end of file diff --git a/training/yolov8_seg/Dockerfile b/training/yolov8_seg/Dockerfile new file mode 100644 index 00000000..f8cb52ac --- /dev/null +++ b/training/yolov8_seg/Dockerfile @@ -0,0 +1,27 @@ +ARG base_image=pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime +ARG timezone +FROM $base_image + +ENV DEBIAN_FRONTEND=noninteractive, TZ=$timezone + +RUN apt-get update && \ + apt-get -y --no-install-recommends install git build-essential python3-opencv wget vim sudo + +RUN git clone https://github.com/hailo-ai/ultralytics.git && \ + cd ultralytics && \ + pip install --upgrade pip && \ + pip install -r requirements.txt && \ + pip install -e . + +ENV PYTHONPATH=/workspace/ultralytics +WORKDIR /workspace/ultralytics + +ARG user=hailo +ARG group=hailo +ARG uid=1000 +ARG gid=1000 + +RUN groupadd --gid $gid $group && \ + adduser --uid $uid --gid $gid --shell /bin/bash --disabled-password --gecos "" $user && \ + chmod u+w /etc/sudoers && echo "$user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && chmod -w /etc/sudoers && \ + chown -R $user:$group /workspace \ No newline at end of file diff --git a/training/yolov8_seg/README.rst b/training/yolov8_seg/README.rst new file mode 100644 index 00000000..1749af26 --- /dev/null +++ b/training/yolov8_seg/README.rst @@ -0,0 +1,127 @@ +====================== +YOLOv8-seg Retraining +====================== + +* To learn more about yolov8 look `here `_ + +---------- + +Prerequisites +------------- + +* docker (\ `installation instructions `_\ ) +* nvidia-docker2 (\ `installation instructions `_\ ) + + +**NOTE:** In case you are using the Hailo Software Suite docker, make sure to run all of the following instructions outside of that docker. + +Environment Preparations +------------------------ + + +#. | Build the docker image: + + .. raw:: html + :name:validation + +

+      cd hailo_model_zoo/training/yolov8_seg
+      docker build --build-arg timezone=`cat /etc/timezone` -t yolov8_seg:v0 .
+      
+ + | the following optional arguments can be passed via --build-arg: + + * ``timezone`` - a string for setting up timezone. E.g. "Asia/Jerusalem" + * ``user`` - username for a local non-root user. Defaults to 'hailo'. + * ``group`` - default group for a local non-root user. Defaults to 'hailo'. + * ``uid`` - user id for a local non-root user. + * ``gid`` - group id for a local non-root user. + + | * This command will build the docker image with the necessary requirements using the Dockerfile exists in yolov8-seg directory. + + +#. | Start your docker: + + .. raw:: html + :name:validation + + + docker run --name "your_docker_name" -it --gpus all --ipc=host -v /path/to/local/data/dir:/path/to/docker/data/dir yolov8_seg:v0 + + + * ``docker run`` create a new docker container. + * ``--name `` name for your container. + * ``-it`` runs the command interactively. + * ``--gpus all`` allows access to all GPUs. + * ``--ipc=host`` sets the IPC mode for the container. + * ``-v /path/to/local/data/dir:/path/to/docker/data/dir`` maps ``/path/to/local/data/dir`` from the host to the container. You can use this command multiple times to mount multiple directories. + * ``yolov8:v0`` the name of the docker image. + +Training and exporting to ONNX +------------------------------ + + +#. | Train your model: + | Once the docker is started, you can start training your model. + + * | Prepare your custom dataset - Follow the steps described `here `_ in order to create: + + * ``dataset.yaml`` configuration file + * Labels - each image should have labels in YOLO format with corresponding txt file for each image. + * Make sure to include number of classes field in the yaml, for example: ``nc: 80`` + + * | Start training - The following command is an example for training a *yolov8s-seg* model. + + .. raw:: html + :name:validation + + + yolo segment train data=coco128-seg.yaml model=yolov8s-seg.pt name=retrain_yolov8s_seg epochs=100 batch=16 + + + * ``yolov8s-seg.pt`` - pretrained weights. The pretrained weights for *yolov8n-seg*\ , *yolov8s-seg*\ , *yolov8m-seg*\ , *yolov8l-seg* and *yolov8x-seg* will be downloaded to your working directory when running this command. + * ``coco128-seg.yaml`` - example file for data.yaml file. Can be found at ultralytics/ultralytics/datasets. + * ``retrain_yolov8s_seg`` - the new weights will be saved at ultralytics/runs/segment/retrain_yolov8s_seg. + * ``epochs`` - number of epochs to run. default to 100. + * ``batch`` - number of images per batch. default to 16. + + **NOTE:**\ more configurable parameters can be found at https://docs.ultralytics.com/modes/train/ + +#. | Export to ONNX: + + | In order to export your trained YOLOv8-seg model to ONNX run the following script: + + .. raw:: html + :name:validation + + + yolo export model=/path/to/trained/best.pt imgsz=640 format=onnx opset=11 # export at 640x640 + + + **NOTE:**\ more configurable parameters can be found at https://docs.ultralytics.com/modes/export/ + +---- + +Compile the Model using Hailo Model Zoo +--------------------------------------- + +| You can generate an HEF file for inference on Hailo-8 from your trained ONNX model. +| In order to do so you need a working model-zoo environment. +| Choose the corresponding YAML from our networks configuration directory, i.e. ``hailo_model_zoo/cfg/networks/yolov8s-seg.yaml``\ , and run compilation using the model zoo: + +.. raw:: html + :name:validation + + + hailomz compile --ckpt yolov8s-seg.onnx --calib-path /path/to/calibration/imgs/dir/ --yaml path/to/yolov8s-seg.yaml + + +* | ``--ckpt`` - path to your ONNX file. +* | ``--calib-path`` - path to a directory with your calibration images in JPEG/png format +* | ``--yaml`` - path to your configuration YAML file. +* | The model zoo will take care of adding the input normalization to be part of the model. + +.. note:: + - Make sure to also update ``preprocessing.input_shape`` field on `yolo.yaml `_, if it was changed on retraining. + + More details about YAML files are presented `here <../../docs/YAML.rst>`_. \ No newline at end of file