Diegokang yuzhe
Published

COVID-19 Sniper: An advanced diagnostic tool for pneumonia

YOLO V2-VOC-Tiny was run on the KV260 development board to identify and localize COVID-19 infections and lung lesions on radiographs.

306

Things used in this project

Hardware components

Kria KV260 Vision AI Starter Kit
AMD Kria KV260 Vision AI Starter Kit
×1
HIKVISION DS-E11(USB Web Cam)
×1

Software apps and online services

PetaLinux
AMD PetaLinux
Snappy Ubuntu Core
Snappy Ubuntu Core
Vitis Unified Software Platform
AMD Vitis Unified Software Platform

Story

Read more

Code

aiinference.json

JSON
{
  "xclbin-location":"/lib/firmware/xilinx/kv260-smartcam/kv260-smartcam.xclbin",
  "ivas-library-repo": "/usr/lib/",
  "element-mode":"inplace",
  "kernels" :[
    {
      "library-name":"libivas_xdpuinfer.so",
      "config": {
        "model-name" : "yolov2tiny",
        "model-class" : "YOLOV2",
        "model-path" : "/home/petalinux",
        "run_time_model" : false,
        "need_preprocess" : false,
        "performance_test" : false,
        "debug_level" : 0
      }
    }
  ]
}

drawresult.json

JSON
{
  "xclbin-location":"/usr/lib/dpu.xclbin",
  "ivas-library-repo": "/opt/xilinx/lib",
  "element-mode":"inplace",
  "kernels" :[
    {
      "library-name":"libivas_airender.so",
      "config": {
        "fps_interval" : 10,
        "font_size" : 2,
        "font" : 1,
        "thickness" : 2,
        "debug_level" : 0,
        "label_color" : { "blue" : 0, "green" : 0, "red" : 255 },
        "label_filter" : [ "class", "probability" ],
        "classes" : [
                {
                "name" : "covid-19",
                "blue" : 255,
                "green" : 0,
                "red" : 0
                }]
      }
    }
  ]
}

label.json

JSON
{
  "model-name": "yolov2tiny",
  "num-labels": 1,
  "labels" :[
    {
      "name": "covid-19",
      "label": 0,
      "display_name" : "covid-19"
    }  ]
}

meta.json

JSON
{
    "lib": "libvart-dpu-runner.so",
    "filename": "yolov2tiny.xmodel",
    "kernel": [
        "subgraph_yolov2-tinyconvolutional1\/Conv2D"
    ],
    "target": "DPUCZDX8G_ISA0_B3136_MAX_BG2"
}

preprocess.json

JSON
{
  "xclbin-location":"/lib/firmware/xilinx/kv260-smartcam/kv260-smartcam.xclbin",
  "ivas-library-repo": "/opt/xilinx/lib",
  "kernels": [
    {
      "kernel-name": "pp_pipeline_accel:pp_pipeline_accel_1",
      "library-name": "libivas_xpp.so",
      "config": {
        "debug_level" : 1,
        "mean_r": 0,
        "mean_g": 0,
        "mean_b": 0,
        "scale_r": 0.25,
        "scale_g": 0.25,
        "scale_b": 0.25
      }
    }
  ]
}

yolov2tiny.prototxt

JSON
model {
  name: "yolov2tiny"
  kernel {
     name: "yolov2tiny"
     mean: 0.0
     mean: 0.0
     mean: 0.0
     scale: 0.00390625
     scale: 0.00390625
     scale: 0.00390625
  }
  model_type : YOLOv3
 yolo_v3_param {
    num_classes: 1
    anchorCnt: 5
    conf_threshold: 0.2
    nms_threshold: 0.2
    biases: 1.08
    biases: 1.19
    biases: 3.42
    biases: 4.41
    biases: 6.63
    biases: 11.38
    biases: 9.42
    biases: 5.11
    biases: 16.62
    biases: 10.52
    test_mAP: false
  }
  is_tf : true
}

yolov2tiny.xmodel

JSON
No preview (download only).

Credits

Diego

Diego

1 project • 0 followers
kang yuzhe

kang yuzhe

1 project • 0 followers
Thanks to hdcoe.

Comments