From fd56e64938d2427de88854f519d628f0bc4ae899 Mon Sep 17 00:00:00 2001 From: Davide Sapienza Date: Tue, 11 May 2021 17:02:43 +0200 Subject: [PATCH] Update the README and split it into several files. Signed-off-by: Davide Sapienza --- README.md | 339 +------------------------------------- docs/demo.md | 213 ++++++++++++++++++++++++ docs/exporting_weights.md | 100 +++++++++++ docs/mAP_demo.md | 34 ++++ docs/windows.md | 95 +++++++++++ 5 files changed, 447 insertions(+), 334 deletions(-) create mode 100644 docs/demo.md create mode 100644 docs/exporting_weights.md create mode 100644 docs/mAP_demo.md create mode 100644 docs/windows.md diff --git a/README.md b/README.md index 9e4b811..12f2104 100644 --- a/README.md +++ b/README.md @@ -70,26 +70,11 @@ Results for COCO val 2017 (5k images), on RTX 2080Ti, with conf threshold=0.001 - [How to compile this repo](#how-to-compile-this-repo) - [Workflow](#workflow) - [How to export weights](#how-to-export-weights) - - [1)Export weights from darknet](#1export-weights-from-darknet) - - [2)Export weights for DLA34 and ResNet101](#2export-weights-for-dla34-and-resnet101) - - [3)Export weights for CenterNet](#3export-weights-for-centernet) - - [4)Export weights for MobileNetSSD](#4export-weights-for-mobilenetssd) - [Run the demo](#run-the-demo) - - [FP16 inference](#fp16-inference) - - [INT8 inference](#int8-inference) - [mAP demo](#map-demo) - [Existing tests and supported networks](#existing-tests-and-supported-networks) - [References](#references) - [tkDNN on Windows 10 (experimental)](#tkdnn-on-windows-10-experimental) - - [Dependencies-Windows](#dependencies-windows) - - [Compiling tkDNN on Windows](#compiling-tkdnn-on-windows) - - [Run the demo on Windows](#run-the-demo-on-windows) - - [FP16 inference windows](#fp16-inference-windows) - - [INT8 inference windows](#int8-inference-windows) - - [Known issues with tkDNN on Windows](#known-issues-with-tkdnn-on-windows) - - - ## Dependencies @@ -126,246 +111,17 @@ Steps needed to do inference on tkDNN with a custom neural network. * Create a new test and define the network, layer by layer using the weights extracted and the output to check the results. * Do inference. -## How to export weights +## Exporting weights -Weights are essential for any network to run inference. For each test a folder organized as follow is needed (in the build folder): -``` - test_nn - |---- layers/ (folder containing a binary file for each layer with the corresponding wieghts and bias) - |---- debug/ (folder containing a binary file for each layer with the corresponding outputs) -``` -Therefore, once the weights have been exported, the folders layers and debug should be placed in the corresponding test. - -### 1)Export weights from darknet -To export weights for NNs that are defined in darknet framework, use [this](https://git.hipert.unimore.it/fgatti/darknet.git) fork of darknet and follow these steps to obtain a correct debug and layers folder, ready for tkDNN. - -``` -git clone https://git.hipert.unimore.it/fgatti/darknet.git -cd darknet -make -mkdir layers debug -./darknet export layers -``` -N.b. Use compilation with CPU (leave GPU=0 in Makefile) if you also want debug. - -### 2)Export weights for DLA34 and ResNet101 -To get weights and outputs needed to run the tests dla34 and resnet101 use the Python script and the Anaconda environment included in the repository. - -Create Anaconda environment and activate it: -``` -conda env create -f file_name.yml -source activate env_name -python