Jonathan Li
Created March 20, 2022 © MIT

Porch Pirate Theft Detection

This application detect and deters porch pirates from stealing packages.

IntermediateShowcase (no instructions)5 hours57
Porch Pirate Theft Detection

Things used in this project

Hardware components

Kria KV260 Vision AI Starter Kit
AMD Kria KV260 Vision AI Starter Kit
×1
Camera (generic)
×1

Software apps and online services

PYNQ Framework
AMD PYNQ Framework

Story

Read more

Schematics

Connections Schematic

Show what the Kria KV 260 board connects to at a high level

Code

test_overlay_xmodel.py

Python
Code to test which xmodels are accepted by dpu overlay. Use by pasting into Kria-Pynq resnet notebook.
"""
Purpose: test which xmodels are accepted by dpu overlay
"""

xs = """vitis1.4/ENet_cityscapes_pt/ENet_cityscapes_pt.xmodel
vitis1.4/FADNet_0_pt/FADNet_0_pt.xmodel
vitis1.4/FADNet_1_pt/FADNet_1_pt.xmodel
vitis1.4/FADNet_2_pt/FADNet_2_pt.xmodel
vitis1.4/FPN-resnet18_Endov/FPN-resnet18_Endov.xmodel
vitis1.4/FPN-resnet18_covid19-seg_pt/FPN-resnet18_covid19-seg_pt.xmodel
vitis1.4/FPN_Res18_Medical_segmentation/FPN_Res18_Medical_segmentation.xmodel
vitis1.4/MLPerf_resnet50_v1.5_tf/MLPerf_resnet50_v1.5_tf.xmodel
vitis1.4/MT-resnet18_mixed_pt/MT-resnet18_mixed_pt.xmodel
vitis1.4/RefineDet-Medical_EDD_tf/RefineDet-Medical_EDD_tf.xmodel
vitis1.4/SemanticFPN_Mobilenetv2_pt/SemanticFPN_Mobilenetv2_pt.xmodel
vitis1.4/SemanticFPN_cityscapes_pt/SemanticFPN_cityscapes_pt.xmodel
vitis1.4/bcc_pt/bcc_pt.xmodel
vitis1.4/centerpoint_0_pt/centerpoint_0_pt.xmodel
vitis1.4/centerpoint_1_pt/centerpoint_1_pt.xmodel
vitis1.4/densebox_320_320/densebox_320_320.xmodel
vitis1.4/densebox_640_360/densebox_640_360.xmodel
vitis1.4/efficientNet-edgetpu-L_tf/efficientNet-edgetpu-L_tf.xmodel
vitis1.4/efficientNet-edgetpu-M_tf/efficientNet-edgetpu-M_tf.xmodel
vitis1.4/efficientNet-edgetpu-S_tf/efficientNet-edgetpu-S_tf.xmodel
vitis1.4/face-quality/face-quality.xmodel
vitis1.4/face-quality_pt/face-quality_pt.xmodel
vitis1.4/face_landmark/face_landmark.xmodel
vitis1.4/facerec-resnet20_mixed_pt/facerec-resnet20_mixed_pt.xmodel
vitis1.4/facerec_resnet20/facerec_resnet20.xmodel
vitis1.4/facerec_resnet64/facerec_resnet64.xmodel
vitis1.4/facereid-large_pt/facereid-large_pt.xmodel
vitis1.4/facereid-small_pt/facereid-small_pt.xmodel
vitis1.4/fpn/fpn.xmodel
vitis1.4/hourglass-pe_mpii/hourglass-pe_mpii.xmodel
vitis1.4/inception_resnet_v2_tf/inception_resnet_v2_tf.xmodel
vitis1.4/inception_v1/inception_v1.xmodel
vitis1.4/inception_v1_tf/inception_v1_tf.xmodel
vitis1.4/inception_v2/inception_v2.xmodel
vitis1.4/inception_v2_tf/inception_v2_tf.xmodel
vitis1.4/inception_v3/inception_v3.xmodel
vitis1.4/inception_v3_pt/inception_v3_pt.xmodel
vitis1.4/inception_v3_tf/inception_v3_tf.xmodel
vitis1.4/inception_v3_tf2/inception_v3_tf2.xmodel
vitis1.4/inception_v4/inception_v4.xmodel
vitis1.4/inception_v4_2016_09_09_tf/inception_v4_2016_09_09_tf.xmodel
vitis1.4/medical_seg_cell_tf2/medical_seg_cell_tf2.xmodel
vitis1.4/mlperf_ssd_resnet34_tf/mlperf_ssd_resnet34_tf.xmodel
vitis1.4/mobilenet_1_0_224_tf2/mobilenet_1_0_224_tf2.xmodel
vitis1.4/mobilenet_edge_0_75_tf/mobilenet_edge_0_75_tf.xmodel
vitis1.4/mobilenet_edge_1_0_tf/mobilenet_edge_1_0_tf.xmodel
vitis1.4/mobilenet_v1_0_25_128_tf/mobilenet_v1_0_25_128_tf.xmodel
vitis1.4/mobilenet_v1_0_5_160_tf/mobilenet_v1_0_5_160_tf.xmodel
vitis1.4/mobilenet_v1_1_0_224_tf/mobilenet_v1_1_0_224_tf.xmodel
vitis1.4/mobilenet_v2/mobilenet_v2.xmodel
vitis1.4/mobilenet_v2_1_0_224_tf/mobilenet_v2_1_0_224_tf.xmodel
vitis1.4/mobilenet_v2_1_4_224_tf/mobilenet_v2_1_4_224_tf.xmodel
vitis1.4/mobilenet_v2_cityscapes_tf/mobilenet_v2_cityscapes_tf.xmodel
vitis1.4/multi_task/multi_task.xmodel
vitis1.4/multi_task_v3_pt/multi_task_v3_pt.xmodel
vitis1.4/openpose_pruned_0_3/openpose_pruned_0_3.xmodel
vitis1.4/personreid-res18_pt/personreid-res18_pt.xmodel
vitis1.4/personreid-res50_pt/personreid-res50_pt.xmodel
vitis1.4/plate_detect/plate_detect.xmodel
vitis1.4/plate_num/plate_num.xmodel
vitis1.4/pmg_pt/pmg_pt.xmodel
vitis1.4/pointpainting_nuscenes_40000_64_1_pt/pointpainting_nuscenes_40000_64_1_pt.xmodel
vitis1.4/pointpillars_kitti_12000_0_pt/pointpillars_kitti_12000_0_pt.xmodel
vitis1.4/pointpillars_kitti_12000_1_pt/pointpillars_kitti_12000_1_pt.xmodel
vitis1.4/pointpillars_nuscenes_40000_64_0_pt/pointpillars_nuscenes_40000_64_0_pt.xmodel
vitis1.4/pointpillars_nuscenes_40000_64_1_pt/pointpillars_nuscenes_40000_64_1_pt.xmodel
vitis1.4/rcan_pruned_tf/rcan_pruned_tf.xmodel
vitis1.4/refinedet_VOC_tf/refinedet_VOC_tf.xmodel
vitis1.4/refinedet_baseline/refinedet_baseline.xmodel
vitis1.4/refinedet_pruned_0_8/refinedet_pruned_0_8.xmodel
vitis1.4/refinedet_pruned_0_92/refinedet_pruned_0_92.xmodel
vitis1.4/refinedet_pruned_0_96/refinedet_pruned_0_96.xmodel
vitis1.4/reid/reid.xmodel
vitis1.4/resnet18/resnet18.xmodel
vitis1.4/resnet50/resnet50.xmodel
vitis1.4/resnet50_pt/resnet50_pt.xmodel
vitis1.4/resnet50_tf2/resnet50_tf2.xmodel
vitis1.4/resnet_v1_101_tf/resnet_v1_101_tf.xmodel
vitis1.4/resnet_v1_152_tf/resnet_v1_152_tf.xmodel
vitis1.4/resnet_v1_50_tf/resnet_v1_50_tf.xmodel
vitis1.4/resnet_v2_101_tf/resnet_v2_101_tf.xmodel
vitis1.4/resnet_v2_152_tf/resnet_v2_152_tf.xmodel
vitis1.4/resnet_v2_50_tf/resnet_v2_50_tf.xmodel
vitis1.4/retinaface/retinaface.xmodel
vitis1.4/salsanext_pt/salsanext_pt.xmodel
vitis1.4/salsanext_v2_pt/salsanext_v2_pt.xmodel
vitis1.4/semantic_seg_citys_tf2/semantic_seg_citys_tf2.xmodel
vitis1.4/semanticfpn_nuimage_576_320_pt/semanticfpn_nuimage_576_320_pt.xmodel
vitis1.4/sp_net/sp_net.xmodel
vitis1.4/squeezenet/squeezenet.xmodel
vitis1.4/squeezenet_pt/squeezenet_pt.xmodel
vitis1.4/ssd_adas_pruned_0_95/ssd_adas_pruned_0_95.xmodel
vitis1.4/ssd_inception_v2_coco_tf/ssd_inception_v2_coco_tf.xmodel
vitis1.4/ssd_mobilenet_v1_coco_tf/ssd_mobilenet_v1_coco_tf.xmodel
vitis1.4/ssd_mobilenet_v2/ssd_mobilenet_v2.xmodel
vitis1.4/ssd_mobilenet_v2_coco_tf/ssd_mobilenet_v2_coco_tf.xmodel
vitis1.4/ssd_pedestrian_pruned_0_97/ssd_pedestrian_pruned_0_97.xmodel
vitis1.4/ssd_resnet_50_fpn_coco_tf/ssd_resnet_50_fpn_coco_tf.xmodel
vitis1.4/ssd_traffic_pruned_0_9/ssd_traffic_pruned_0_9.xmodel
vitis1.4/ssdlite_mobilenet_v2_coco_tf/ssdlite_mobilenet_v2_coco_tf.xmodel
vitis1.4/tiny_yolov3_vmss/tiny_yolov3_vmss.xmodel
vitis1.4/unet_chaos-CT_pt/unet_chaos-CT_pt.xmodel
vitis1.4/vgg_16_tf/vgg_16_tf.xmodel
vitis1.4/vgg_19_tf/vgg_19_tf.xmodel
vitis1.4/vpgnet_pruned_0_99/vpgnet_pruned_0_99.xmodel
vitis1.4/yolov2_voc/yolov2_voc.xmodel
vitis1.4/yolov2_voc_pruned_0_66/yolov2_voc_pruned_0_66.xmodel
vitis1.4/yolov2_voc_pruned_0_71/yolov2_voc_pruned_0_71.xmodel
vitis1.4/yolov2_voc_pruned_0_77/yolov2_voc_pruned_0_77.xmodel
vitis1.4/yolov3_adas_pruned_0_9/yolov3_adas_pruned_0_9.xmodel
vitis1.4/yolov3_bdd/yolov3_bdd.xmodel
vitis1.4/yolov3_voc/yolov3_voc.xmodel
vitis1.4/yolov3_voc_tf/yolov3_voc_tf.xmodel
vitis1.4/yolov4_leaky_spp_m/yolov4_leaky_spp_m.xmodel
vitis1.4/yolov4_leaky_spp_m_pruned_0_36/yolov4_leaky_spp_m_pruned_0_36.xmodel
vitis2.0/ENet_cityscapes_pt/ENet_cityscapes_pt.xmodel
vitis2.0/FADNet_0_pt/FADNet_0_pt.xmodel
vitis2.0/FADNet_1_pt/FADNet_1_pt.xmodel
vitis2.0/FADNet_2_pt/FADNet_2_pt.xmodel
vitis2.0/FPN-resnet18_Endov/FPN-resnet18_Endov.xmodel
vitis2.0/FPN-resnet18_covid19-seg_pt/FPN-resnet18_covid19-seg_pt.xmodel
vitis2.0/FPN_Res18_Medical_segmentation/FPN_Res18_Medical_segmentation.xmodel
vitis2.0/MLPerf_resnet50_v1.5_tf/MLPerf_resnet50_v1.5_tf.xmodel
vitis2.0/MT-resnet18_mixed_pt/MT-resnet18_mixed_pt.xmodel
vitis2.0/RefineDet-Medical_EDD_tf/RefineDet-Medical_EDD_tf.xmodel
vitis2.0/SemanticFPN_Mobilenetv2_pt/SemanticFPN_Mobilenetv2_pt.xmodel
vitis2.0/SemanticFPN_cityscapes_pt/SemanticFPN_cityscapes_pt.xmodel
vitis2.0/bcc_pt/bcc_pt.xmodel
vitis2.0/centerpoint_0_pt/centerpoint_0_pt.xmodel
vitis2.0/centerpoint_1_pt/centerpoint_1_pt.xmodel
vitis2.0/densebox_320_320/densebox_320_320.xmodel
vitis2.0/densebox_640_360/densebox_640_360.xmodel
vitis2.0/efficientNet-edgetpu-L_tf/efficientNet-edgetpu-L_tf.xmodel
vitis2.0/efficientNet-edgetpu-M_tf/efficientNet-edgetpu-M_tf.xmodel
vitis2.0/efficientNet-edgetpu-S_tf/efficientNet-edgetpu-S_tf.xmodel
vitis2.0/face-quality/face-quality.xmodel
vitis2.0/face-quality_pt/face-quality_pt.xmodel
vitis2.0/face_landmark/face_landmark.xmodel
vitis2.0/facerec-resnet20_mixed_pt/facerec-resnet20_mixed_pt.xmodel
vitis2.0/facerec_resnet20/facerec_resnet20.xmodel
vitis2.0/facerec_resnet64/facerec_resnet64.xmodel
vitis2.0/facereid-large_pt/facereid-large_pt.xmodel
vitis2.0/facereid-small_pt/facereid-small_pt.xmodel
vitis2.0/fpn/fpn.xmodel
vitis2.0/hourglass-pe_mpii/hourglass-pe_mpii.xmodel
vitis2.0/inception_resnet_v2_tf/inception_resnet_v2_tf.xmodel
vitis2.0/inception_v1/inception_v1.xmodel
vitis2.0/inception_v1_tf/inception_v1_tf.xmodel
vitis2.0/inception_v2/inception_v2.xmodel
vitis2.0/inception_v2_tf/inception_v2_tf.xmodel
vitis2.0/inception_v3/inception_v3.xmodel
vitis2.0/inception_v3_pt/inception_v3_pt.xmodel
vitis2.0/inception_v3_tf/inception_v3_tf.xmodel
vitis2.0/inception_v3_tf2/inception_v3_tf2.xmodel
vitis2.0/inception_v4/inception_v4.xmodel
vitis2.0/inception_v4_2016_09_09_tf/inception_v4_2016_09_09_tf.xmodel
vitis2.0/medical_seg_cell_tf2/medical_seg_cell_tf2.xmodel
vitis2.0/mlperf_ssd_resnet34_tf/mlperf_ssd_resnet34_tf.xmodel
vitis2.0/mobilenet_1_0_224_tf2/mobilenet_1_0_224_tf2.xmodel
vitis2.0/mobilenet_edge_0_75_tf/mobilenet_edge_0_75_tf.xmodel
vitis2.0/mobilenet_edge_1_0_tf/mobilenet_edge_1_0_tf.xmodel
vitis2.0/mobilenet_v1_0_25_128_tf/mobilenet_v1_0_25_128_tf.xmodel
vitis2.0/mobilenet_v1_0_5_160_tf/mobilenet_v1_0_5_160_tf.xmodel
vitis2.0/mobilenet_v1_1_0_224_tf/mobilenet_v1_1_0_224_tf.xmodel
vitis2.0/mobilenet_v2/mobilenet_v2.xmodel
vitis2.0/mobilenet_v2_1_0_224_tf/mobilenet_v2_1_0_224_tf.xmodel
vitis2.0/mobilenet_v2_1_4_224_tf/mobilenet_v2_1_4_224_tf.xmodel
vitis2.0/mobilenet_v2_cityscapes_tf/mobilenet_v2_cityscapes_tf.xmodel
vitis2.0/multi_task/multi_task.xmodel
vitis2.0/multi_task_v3_pt/multi_task_v3_pt.xmodel
vitis2.0/openpose_pruned_0_3/openpose_pruned_0_3.xmodel
vitis2.0/personreid-res18_pt/personreid-res18_pt.xmodel
vitis2.0/personreid-res50_pt/personreid-res50_pt.xmodel
vitis2.0/plate_detect/plate_detect.xmodel
vitis2.0/plate_num/plate_num.xmodel
vitis2.0/pmg_pt/pmg_pt.xmodel
vitis2.0/pointpainting_nuscenes_40000_64_1_pt/pointpainting_nuscenes_40000_64_1_pt.xmodel
vitis2.0/pointpillars_kitti_12000_0_pt/pointpillars_kitti_12000_0_pt.xmodel
vitis2.0/pointpillars_kitti_12000_1_pt/pointpillars_kitti_12000_1_pt.xmodel
vitis2.0/pointpillars_nuscenes_40000_64_0_pt/pointpillars_nuscenes_40000_64_0_pt.xmodel
vitis2.0/pointpillars_nuscenes_40000_64_1_pt/pointpillars_nuscenes_40000_64_1_pt.xmodel
vitis2.0/rcan_pruned_tf/rcan_pruned_tf.xmodel
vitis2.0/refinedet_VOC_tf/refinedet_VOC_tf.xmodel
vitis2.0/refinedet_baseline/refinedet_baseline.xmodel
vitis2.0/refinedet_pruned_0_8/refinedet_pruned_0_8.xmodel
vitis2.0/refinedet_pruned_0_92/refinedet_pruned_0_92.xmodel
vitis2.0/refinedet_pruned_0_96/refinedet_pruned_0_96.xmodel
vitis2.0/reid/reid.xmodel
vitis2.0/resnet18/resnet18.xmodel
vitis2.0/resnet50/resnet50.xmodel
vitis2.0/resnet50_pt/resnet50_pt.xmodel
vitis2.0/resnet50_tf2/resnet50_tf2.xmodel
vitis2.0/resnet_v1_101_tf/resnet_v1_101_tf.xmodel
vitis2.0/resnet_v1_152_tf/resnet_v1_152_tf.xmodel
vitis2.0/resnet_v1_50_tf/resnet_v1_50_tf.xmodel
vitis2.0/resnet_v2_101_tf/resnet_v2_101_tf.xmodel
vitis2.0/resnet_v2_152_tf/resnet_v2_152_tf.xmodel
vitis2.0/resnet_v2_50_tf/resnet_v2_50_tf.xmodel
vitis2.0/retinaface/retinaface.xmodel
vitis2.0/salsanext_pt/salsanext_pt.xmodel
vitis2.0/salsanext_v2_pt/salsanext_v2_pt.xmodel
vitis2.0/semantic_seg_citys_tf2/semantic_seg_citys_tf2.xmodel
vitis2.0/semanticfpn_nuimage_576_320_pt/semanticfpn_nuimage_576_320_pt.xmodel
vitis2.0/sp_net/sp_net.xmodel
vitis2.0/squeezenet/squeezenet.xmodel
vitis2.0/squeezenet_pt/squeezenet_pt.xmodel
vitis2.0/ssd_adas_pruned_0_95/ssd_adas_pruned_0_95.xmodel
vitis2.0/ssd_inception_v2_coco_tf/ssd_inception_v2_coco_tf.xmodel
vitis2.0/ssd_mobilenet_v1_coco_tf/ssd_mobilenet_v1_coco_tf.xmodel
vitis2.0/ssd_mobilenet_v2/ssd_mobilenet_v2.xmodel
vitis2.0/ssd_mobilenet_v2_coco_tf/ssd_mobilenet_v2_coco_tf.xmodel
vitis2.0/ssd_pedestrian_pruned_0_97/ssd_pedestrian_pruned_0_97.xmodel
vitis2.0/ssd_resnet_50_fpn_coco_tf/ssd_resnet_50_fpn_coco_tf.xmodel
vitis2.0/ssd_traffic_pruned_0_9/ssd_traffic_pruned_0_9.xmodel
vitis2.0/ssdlite_mobilenet_v2_coco_tf/ssdlite_mobilenet_v2_coco_tf.xmodel
vitis2.0/tiny_yolov3_vmss/tiny_yolov3_vmss.xmodel
vitis2.0/unet_chaos-CT_pt/unet_chaos-CT_pt.xmodel
vitis2.0/vgg_16_tf/vgg_16_tf.xmodel
vitis2.0/vgg_19_tf/vgg_19_tf.xmodel
vitis2.0/vpgnet_pruned_0_99/vpgnet_pruned_0_99.xmodel
vitis2.0/yolov2_voc/yolov2_voc.xmodel
vitis2.0/yolov2_voc_pruned_0_66/yolov2_voc_pruned_0_66.xmodel
vitis2.0/yolov2_voc_pruned_0_71/yolov2_voc_pruned_0_71.xmodel
vitis2.0/yolov2_voc_pruned_0_77/yolov2_voc_pruned_0_77.xmodel
vitis2.0/yolov3_adas_pruned_0_9/yolov3_adas_pruned_0_9.xmodel
vitis2.0/yolov3_bdd/yolov3_bdd.xmodel
vitis2.0/yolov3_voc/yolov3_voc.xmodel
vitis2.0/yolov3_voc_tf/yolov3_voc_tf.xmodel
vitis2.0/yolov4_leaky_spp_m/yolov4_leaky_spp_m.xmodel
vitis2.0/yolov4_leaky_spp_m_pruned_0_36/yolov4_leaky_spp_m_pruned_0_36.xmodel""".split('\n')

for x in xs:
    try:
        overlay.load_model(x)
        print('pass', x)
    except:
        print('fail', x)

test_dpu_xmodel.py

Python
Code to test which xmodels work with same dpu inference code as resnet50 notebook. Use by pasting into Kria-Pynq resnet notebook.
"""
Purpose: test which xmodels work with same dpu inference code as resnet notebook
"""

xs = """vitis1.4/ENet_cityscapes_pt/ENet_cityscapes_pt.xmodel
vitis1.4/FADNet_0_pt/FADNet_0_pt.xmodel
vitis1.4/FADNet_1_pt/FADNet_1_pt.xmodel
vitis1.4/FADNet_2_pt/FADNet_2_pt.xmodel
vitis1.4/FPN-resnet18_Endov/FPN-resnet18_Endov.xmodel
vitis1.4/FPN-resnet18_covid19-seg_pt/FPN-resnet18_covid19-seg_pt.xmodel
vitis1.4/FPN_Res18_Medical_segmentation/FPN_Res18_Medical_segmentation.xmodel
vitis1.4/MLPerf_resnet50_v1.5_tf/MLPerf_resnet50_v1.5_tf.xmodel
vitis1.4/MT-resnet18_mixed_pt/MT-resnet18_mixed_pt.xmodel
vitis1.4/RefineDet-Medical_EDD_tf/RefineDet-Medical_EDD_tf.xmodel
vitis1.4/SemanticFPN_Mobilenetv2_pt/SemanticFPN_Mobilenetv2_pt.xmodel
vitis1.4/SemanticFPN_cityscapes_pt/SemanticFPN_cityscapes_pt.xmodel
vitis1.4/bcc_pt/bcc_pt.xmodel
vitis1.4/centerpoint_0_pt/centerpoint_0_pt.xmodel
vitis1.4/centerpoint_1_pt/centerpoint_1_pt.xmodel
vitis1.4/densebox_320_320/densebox_320_320.xmodel
vitis1.4/densebox_640_360/densebox_640_360.xmodel
vitis1.4/efficientNet-edgetpu-M_tf/efficientNet-edgetpu-M_tf.xmodel
vitis1.4/efficientNet-edgetpu-S_tf/efficientNet-edgetpu-S_tf.xmodel
vitis1.4/face-quality/face-quality.xmodel
vitis1.4/face-quality_pt/face-quality_pt.xmodel
vitis1.4/face_landmark/face_landmark.xmodel
vitis1.4/facerec-resnet20_mixed_pt/facerec-resnet20_mixed_pt.xmodel
vitis1.4/facerec_resnet20/facerec_resnet20.xmodel
vitis1.4/facerec_resnet64/facerec_resnet64.xmodel
vitis1.4/facereid-large_pt/facereid-large_pt.xmodel
vitis1.4/facereid-small_pt/facereid-small_pt.xmodel
vitis1.4/fpn/fpn.xmodel
vitis1.4/hourglass-pe_mpii/hourglass-pe_mpii.xmodel
vitis1.4/inception_resnet_v2_tf/inception_resnet_v2_tf.xmodel
vitis1.4/inception_v1/inception_v1.xmodel
vitis1.4/inception_v1_tf/inception_v1_tf.xmodel
vitis1.4/inception_v2/inception_v2.xmodel
vitis1.4/inception_v2_tf/inception_v2_tf.xmodel
vitis1.4/inception_v3/inception_v3.xmodel
vitis1.4/inception_v3_pt/inception_v3_pt.xmodel
vitis1.4/inception_v3_tf/inception_v3_tf.xmodel
vitis1.4/inception_v3_tf2/inception_v3_tf2.xmodel
vitis1.4/inception_v4/inception_v4.xmodel
vitis1.4/inception_v4_2016_09_09_tf/inception_v4_2016_09_09_tf.xmodel
vitis1.4/medical_seg_cell_tf2/medical_seg_cell_tf2.xmodel
vitis1.4/mlperf_ssd_resnet34_tf/mlperf_ssd_resnet34_tf.xmodel
vitis1.4/mobilenet_1_0_224_tf2/mobilenet_1_0_224_tf2.xmodel
vitis1.4/mobilenet_edge_0_75_tf/mobilenet_edge_0_75_tf.xmodel
vitis1.4/mobilenet_edge_1_0_tf/mobilenet_edge_1_0_tf.xmodel
vitis1.4/mobilenet_v1_0_25_128_tf/mobilenet_v1_0_25_128_tf.xmodel
vitis1.4/mobilenet_v1_0_5_160_tf/mobilenet_v1_0_5_160_tf.xmodel
vitis1.4/mobilenet_v1_1_0_224_tf/mobilenet_v1_1_0_224_tf.xmodel
vitis1.4/mobilenet_v2/mobilenet_v2.xmodel
vitis1.4/mobilenet_v2_1_0_224_tf/mobilenet_v2_1_0_224_tf.xmodel
vitis1.4/mobilenet_v2_1_4_224_tf/mobilenet_v2_1_4_224_tf.xmodel
vitis1.4/mobilenet_v2_cityscapes_tf/mobilenet_v2_cityscapes_tf.xmodel
vitis1.4/multi_task/multi_task.xmodel
vitis1.4/multi_task_v3_pt/multi_task_v3_pt.xmodel
vitis1.4/openpose_pruned_0_3/openpose_pruned_0_3.xmodel
vitis1.4/personreid-res18_pt/personreid-res18_pt.xmodel
vitis1.4/personreid-res50_pt/personreid-res50_pt.xmodel
vitis1.4/plate_detect/plate_detect.xmodel
vitis1.4/pmg_pt/pmg_pt.xmodel
vitis1.4/pointpainting_nuscenes_40000_64_1_pt/pointpainting_nuscenes_40000_64_1_pt.xmodel
vitis1.4/pointpillars_kitti_12000_0_pt/pointpillars_kitti_12000_0_pt.xmodel
vitis1.4/pointpillars_kitti_12000_1_pt/pointpillars_kitti_12000_1_pt.xmodel
vitis1.4/pointpillars_nuscenes_40000_64_0_pt/pointpillars_nuscenes_40000_64_0_pt.xmodel
vitis1.4/pointpillars_nuscenes_40000_64_1_pt/pointpillars_nuscenes_40000_64_1_pt.xmodel
vitis1.4/rcan_pruned_tf/rcan_pruned_tf.xmodel
vitis1.4/refinedet_VOC_tf/refinedet_VOC_tf.xmodel
vitis1.4/refinedet_baseline/refinedet_baseline.xmodel
vitis1.4/refinedet_pruned_0_8/refinedet_pruned_0_8.xmodel
vitis1.4/refinedet_pruned_0_92/refinedet_pruned_0_92.xmodel
vitis1.4/refinedet_pruned_0_96/refinedet_pruned_0_96.xmodel
vitis1.4/reid/reid.xmodel
vitis1.4/resnet18/resnet18.xmodel
vitis1.4/resnet50/resnet50.xmodel
vitis1.4/resnet50_pt/resnet50_pt.xmodel
vitis1.4/resnet50_tf2/resnet50_tf2.xmodel
vitis1.4/resnet_v1_101_tf/resnet_v1_101_tf.xmodel
vitis1.4/resnet_v1_152_tf/resnet_v1_152_tf.xmodel
vitis1.4/resnet_v1_50_tf/resnet_v1_50_tf.xmodel
vitis1.4/retinaface/retinaface.xmodel
vitis1.4/salsanext_pt/salsanext_pt.xmodel
vitis1.4/salsanext_v2_pt/salsanext_v2_pt.xmodel
vitis1.4/semantic_seg_citys_tf2/semantic_seg_citys_tf2.xmodel
vitis1.4/semanticfpn_nuimage_576_320_pt/semanticfpn_nuimage_576_320_pt.xmodel
vitis1.4/squeezenet/squeezenet.xmodel
vitis1.4/squeezenet_pt/squeezenet_pt.xmodel
vitis1.4/ssd_adas_pruned_0_95/ssd_adas_pruned_0_95.xmodel
vitis1.4/ssd_inception_v2_coco_tf/ssd_inception_v2_coco_tf.xmodel
vitis1.4/ssd_mobilenet_v1_coco_tf/ssd_mobilenet_v1_coco_tf.xmodel
vitis1.4/ssd_mobilenet_v2/ssd_mobilenet_v2.xmodel
vitis1.4/ssd_mobilenet_v2_coco_tf/ssd_mobilenet_v2_coco_tf.xmodel
vitis1.4/ssd_pedestrian_pruned_0_97/ssd_pedestrian_pruned_0_97.xmodel
vitis1.4/ssd_resnet_50_fpn_coco_tf/ssd_resnet_50_fpn_coco_tf.xmodel
vitis1.4/ssd_traffic_pruned_0_9/ssd_traffic_pruned_0_9.xmodel
vitis1.4/ssdlite_mobilenet_v2_coco_tf/ssdlite_mobilenet_v2_coco_tf.xmodel
vitis1.4/tiny_yolov3_vmss/tiny_yolov3_vmss.xmodel
vitis1.4/unet_chaos-CT_pt/unet_chaos-CT_pt.xmodel
vitis1.4/vgg_16_tf/vgg_16_tf.xmodel
vitis1.4/vgg_19_tf/vgg_19_tf.xmodel
vitis1.4/vpgnet_pruned_0_99/vpgnet_pruned_0_99.xmodel
vitis1.4/yolov2_voc/yolov2_voc.xmodel
vitis1.4/yolov2_voc_pruned_0_66/yolov2_voc_pruned_0_66.xmodel
vitis1.4/yolov2_voc_pruned_0_71/yolov2_voc_pruned_0_71.xmodel
vitis1.4/yolov2_voc_pruned_0_77/yolov2_voc_pruned_0_77.xmodel
vitis1.4/yolov3_adas_pruned_0_9/yolov3_adas_pruned_0_9.xmodel
vitis1.4/yolov3_bdd/yolov3_bdd.xmodel
vitis1.4/yolov3_voc/yolov3_voc.xmodel
vitis1.4/yolov3_voc_tf/yolov3_voc_tf.xmodel
vitis1.4/yolov4_leaky_spp_m/yolov4_leaky_spp_m.xmodel
vitis1.4/yolov4_leaky_spp_m_pruned_0_36/yolov4_leaky_spp_m_pruned_0_36.xmodel
vitis2.0/RefineDet-Medical_EDD_tf/RefineDet-Medical_EDD_tf.xmodel
vitis2.0/SemanticFPN_Mobilenetv2_pt/SemanticFPN_Mobilenetv2_pt.xmodel
vitis2.0/centerpoint_0_pt/centerpoint_0_pt.xmodel
vitis2.0/centerpoint_1_pt/centerpoint_1_pt.xmodel
vitis2.0/densebox_320_320/densebox_320_320.xmodel
vitis2.0/densebox_640_360/densebox_640_360.xmodel
vitis2.0/efficientNet-edgetpu-M_tf/efficientNet-edgetpu-M_tf.xmodel
vitis2.0/efficientNet-edgetpu-S_tf/efficientNet-edgetpu-S_tf.xmodel
vitis2.0/face-quality/face-quality.xmodel
vitis2.0/face-quality_pt/face-quality_pt.xmodel
vitis2.0/face_landmark/face_landmark.xmodel
vitis2.0/facerec-resnet20_mixed_pt/facerec-resnet20_mixed_pt.xmodel
vitis2.0/facerec_resnet20/facerec_resnet20.xmodel
vitis2.0/facerec_resnet64/facerec_resnet64.xmodel
vitis2.0/hourglass-pe_mpii/hourglass-pe_mpii.xmodel
vitis2.0/inception_resnet_v2_tf/inception_resnet_v2_tf.xmodel
vitis2.0/inception_v1/inception_v1.xmodel
vitis2.0/inception_v1_tf/inception_v1_tf.xmodel
vitis2.0/inception_v2/inception_v2.xmodel
vitis2.0/inception_v2_tf/inception_v2_tf.xmodel
vitis2.0/inception_v3/inception_v3.xmodel
vitis2.0/inception_v3_pt/inception_v3_pt.xmodel
vitis2.0/inception_v3_tf/inception_v3_tf.xmodel
vitis2.0/inception_v3_tf2/inception_v3_tf2.xmodel
vitis2.0/inception_v4/inception_v4.xmodel
vitis2.0/inception_v4_2016_09_09_tf/inception_v4_2016_09_09_tf.xmodel
vitis2.0/medical_seg_cell_tf2/medical_seg_cell_tf2.xmodel
vitis2.0/mobilenet_1_0_224_tf2/mobilenet_1_0_224_tf2.xmodel
vitis2.0/mobilenet_edge_0_75_tf/mobilenet_edge_0_75_tf.xmodel
vitis2.0/mobilenet_edge_1_0_tf/mobilenet_edge_1_0_tf.xmodel
vitis2.0/mobilenet_v1_0_25_128_tf/mobilenet_v1_0_25_128_tf.xmodel
vitis2.0/mobilenet_v1_0_5_160_tf/mobilenet_v1_0_5_160_tf.xmodel
vitis2.0/mobilenet_v1_1_0_224_tf/mobilenet_v1_1_0_224_tf.xmodel
vitis2.0/mobilenet_v2/mobilenet_v2.xmodel
vitis2.0/mobilenet_v2_1_0_224_tf/mobilenet_v2_1_0_224_tf.xmodel
vitis2.0/mobilenet_v2_1_4_224_tf/mobilenet_v2_1_4_224_tf.xmodel
vitis2.0/mobilenet_v2_cityscapes_tf/mobilenet_v2_cityscapes_tf.xmodel
vitis2.0/openpose_pruned_0_3/openpose_pruned_0_3.xmodel
vitis2.0/plate_detect/plate_detect.xmodel
vitis2.0/pointpainting_nuscenes_40000_64_1_pt/pointpainting_nuscenes_40000_64_1_pt.xmodel
vitis2.0/pointpillars_kitti_12000_0_pt/pointpillars_kitti_12000_0_pt.xmodel
vitis2.0/pointpillars_kitti_12000_1_pt/pointpillars_kitti_12000_1_pt.xmodel
vitis2.0/pointpillars_nuscenes_40000_64_0_pt/pointpillars_nuscenes_40000_64_0_pt.xmodel
vitis2.0/pointpillars_nuscenes_40000_64_1_pt/pointpillars_nuscenes_40000_64_1_pt.xmodel
vitis2.0/rcan_pruned_tf/rcan_pruned_tf.xmodel
vitis2.0/refinedet_VOC_tf/refinedet_VOC_tf.xmodel
vitis2.0/refinedet_baseline/refinedet_baseline.xmodel
vitis2.0/refinedet_pruned_0_8/refinedet_pruned_0_8.xmodel
vitis2.0/refinedet_pruned_0_92/refinedet_pruned_0_92.xmodel
vitis2.0/refinedet_pruned_0_96/refinedet_pruned_0_96.xmodel
vitis2.0/salsanext_pt/salsanext_pt.xmodel
vitis2.0/salsanext_v2_pt/salsanext_v2_pt.xmodel
vitis2.0/semantic_seg_citys_tf2/semantic_seg_citys_tf2.xmodel
vitis2.0/squeezenet/squeezenet.xmodel
vitis2.0/squeezenet_pt/squeezenet_pt.xmodel
vitis2.0/ssd_adas_pruned_0_95/ssd_adas_pruned_0_95.xmodel
vitis2.0/ssd_inception_v2_coco_tf/ssd_inception_v2_coco_tf.xmodel
vitis2.0/ssd_mobilenet_v1_coco_tf/ssd_mobilenet_v1_coco_tf.xmodel
vitis2.0/ssd_mobilenet_v2/ssd_mobilenet_v2.xmodel
vitis2.0/ssd_mobilenet_v2_coco_tf/ssd_mobilenet_v2_coco_tf.xmodel
vitis2.0/ssd_pedestrian_pruned_0_97/ssd_pedestrian_pruned_0_97.xmodel
vitis2.0/ssd_traffic_pruned_0_9/ssd_traffic_pruned_0_9.xmodel
vitis2.0/ssdlite_mobilenet_v2_coco_tf/ssdlite_mobilenet_v2_coco_tf.xmodel
vitis2.0/unet_chaos-CT_pt/unet_chaos-CT_pt.xmodel
vitis2.0/vgg_16_tf/vgg_16_tf.xmodel
vitis2.0/vgg_19_tf/vgg_19_tf.xmodel
vitis2.0/vpgnet_pruned_0_99/vpgnet_pruned_0_99.xmodel
vitis2.0/yolov2_voc/yolov2_voc.xmodel
vitis2.0/yolov2_voc_pruned_0_66/yolov2_voc_pruned_0_66.xmodel
vitis2.0/yolov2_voc_pruned_0_71/yolov2_voc_pruned_0_71.xmodel
vitis2.0/yolov2_voc_pruned_0_77/yolov2_voc_pruned_0_77.xmodel""".split("\n")

for x in ["dpu_resnet50.xmodel"] + xs:
    try:
        # x = "dpu_resnet50.xmodel"
        overlay.load_model(x)
        # ------------------------------------
        dpu = overlay.runner

        inputTensors = dpu.get_input_tensors()
        outputTensors = dpu.get_output_tensors()

        shapeIn = tuple(inputTensors[0].dims)
        shapeOut = tuple(outputTensors[0].dims)
        outputSize = int(outputTensors[0].get_data_size() / shapeIn[0])

        softmax = np.empty(outputSize)
        # ------------------------------------
        output_data = [np.empty(shapeOut, dtype=np.float32, order="C")]
        input_data = [np.empty(shapeIn, dtype=np.float32, order="C")]
        image = input_data[0]
        # ------------------------------------
        def run(image_index, display=False):
            preprocessed = preprocess_fn(cv2.imread(
                os.path.join(image_folder, original_images[image_index])))
            image[0,...] = preprocessed.reshape(shapeIn[1:])
            job_id = dpu.execute_async(input_data, output_data)
            dpu.wait(job_id)
            temp = [j.reshape(1, outputSize) for j in output_data]
            softmax = calculate_softmax(temp[0][0])
            if display:
                display_image = cv2.imread(os.path.join(
                    image_folder, original_images[image_index]))
                _, ax = plt.subplots(1)
                _ = ax.imshow(cv2.cvtColor(display_image, cv2.COLOR_BGR2RGB))
        #         print("Classification: {}".format(predict_label(softmax)))
            return predict_label(softmax).strip()
        # ------------------------------------
        run1 = run(1, display=False)
        run2 = run(2, display=False)
        run3 = run(3, display=False)
        print(x, [run1, run2, run3])
    except:
        pass
#         print(x, 'fail')

Package Detection with Tensorflow

Follow the Jupyter notebook step by step. Originally I wanted to port this notebook to Kria KV260 but I could not figure out how to install the necessary python packages.

Package Detection with Yolo

Yolo appears to work with Kria KV260 except the performance is really slow without the use of DPU.

Credits

Jonathan Li

Jonathan Li

3 projects • 1 follower
Thanks to Nicholas Renotte.

Comments