File Exchange

image thumbnail

Deep Learning : Darknet Importer

version 1.0.2 (345 KB) by Kei Otsuka
Import Deep Neural Networks Trained in the Darknet Framework

70 Downloads

Updated 04 Jun 2019

View License

This example shows how to import trained network from Darknet and how to assemble it for image classification. Importer included in this submission can be used to import trained network such as Darknet19 and Darknet53 that are well known as feature extractor for YOLOv2 and YOLOv3.
Please see Live script - tb_darknet2ml.mlx(Live Script) that shows how to import trained network from Darnket and how to assemble it for image classification. And also, importer can be used to import YOLO for object detection, but post processing to produce object detections need to be added outside this example.

[Japanese] 本例題では、Darknet上で学習されたネットワークをMATLABにインポートしてDAG Networkオブジェクトに変換し、画像分類を行う流れをご紹介しています。本例題に含まれるImporterを利用することで、YOLOv2やYOLOv3の特徴抽出器として著名なDarknet19やDarknet53をインポートして利用することができます。一連の流れをLive Script - tb_darknet2ml.mlxでご紹介していますのでご覧ください。また、Importerを利用してYOLOv2等の物体検出用ネットワークをインポートすることもできますが、別途後処理を記述する必要があります。

[Keyward] 画像処理・画像分類・物体検出・ディープラーニング・DeepLearning・デモ・IPCVデモ
・Darknet・Darknet53・Darknet19・YOLOv2・YOLOv3

Cite As

Kei Otsuka (2019). Deep Learning : Darknet Importer (https://www.mathworks.com/matlabcentral/fileexchange/71277-deep-learning-darknet-importer), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

cui

Dear @Kei Otsuka:
I'wil try ,thans very much! 非常感谢!

Kei Otsuka

You can confirm both the number of total parameters and read parameters in command window. If the numbers match up, weights would be loaded successfully. Since YOLOv3-tiny makes prediction at two scales, two unused output would be expected after importing it into MATLAB.

cui

when I load"yolov3-tiny.cfg","yolov3-tiny.weights", after analyzeNetwork , there are three errors,1, missing out put layer, 2,unused output "conv2d_10" ;3,unused output "conv2d_13", is't I successful load cfg and weights files ?

Zohaib Khan

Thank you.
The code requires 'Deep Learning Toolbox Importer for TensorFlow-Keras Models' add-on. Please add it to the description.

Updates

1.0.2

Bug Fix for createRoute.m

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor

importDarknet_v1p2