Skip to content

Latest commit

 

History

History
76 lines (61 loc) · 3.78 KB

File metadata and controls

76 lines (61 loc) · 3.78 KB

物件偵測 (Object Detection)

Examples > AmebaNN > ObjectDetectionLoop


Dataset: Roboflow

Kaggle範例


Pothole模型訓練與檔案轉換

  1. repro https://github.com/WongKinYiu/yolov7
  2. create pothole.yaml %%writefile data/pothole.yaml
train: ./Datasets/pothole/train/images
val:  ./Datasets/pothole/valid/images
test: ./Datasets/pothole/test/images

# Classes
nc: 1  # number of classes
names: ['pothole']  # class names
  1. YOLOv7-Tiny Fixed Resolution Training
!sed -i "s/nc: 80/nc: 1/" cfg/training/yolov7-tiny.yaml
!sed -i "s/IDetect/Detect/" cfg/training/yolov7-tiny.yaml
  1. Download best.pt from kaggle.com/rkuo2000/yolov7-pothole
  2. Compress best.pt to best.zip
  3. Go to Amebapro2 AI convert model, fill up your E-mail
  4. Upload best.zip
  5. Upload one (.jpg) test picture (EX. pothole_test.jpg from Pothole dataset)
  6. Email will be sent to you for the link of network_binary.nb

程式範例:RTSP_YOLOv7_Pothole_Detection.ino

  1. click the recieved Email link to download network_binary.nb
  2. create NN_MDL folder in SDcard, save network_binary.nb under NN_MDL folder, and rename it to yolov7_tiny.nb
  3. plugin SDcard back to AMB82-MINI
  4. modify Sketch RTSP_YOLOv7_Pothole_Detection.ino
    1. modify SSID and PASSWD
    2. modify ObjDet.modelSelect(OBJECT_DETECTION, CUSTOMIZED_YOLOV7TINY, NA_MODEL, NA_MODEL);
  5. burn code into board AMB82-MINI, and run it with VLC player streaming


AMB82 Mini - 物件偵測範例

RTSP_YOLOv7_Pothole
RTSP_YOLOv7_Sushi


AMB82 Mini - SD卡加載模型範例

RTPS_ObjectDetection_AudioClassification.ino


AMB82 Mini - 綫上AI 模型轉換工具