Skip to content

Commit be0c90f

Browse files
authored
Update Instructions (#216)
1 parent 3e8a111 commit be0c90f

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66

77
<!--ACCURACY_PLACEHOLDER-->Accuracy: Stat: 98.01% (updated: 2025-04-28)<!--END_ACCURACY-->
88
## Short description
9-
A lightweight C++ library for performing high-performance inference on MNIST handwritten digits using a modified AlexNet architecture. Designed for efficiency and educational purposes, this project demonstrates how classic CNNs can be optimized for small-scale tasks in native environments.
9+
A lightweight C++ library for performing high-performance inference on classification tasks. Designed for efficiency and educational purposes, this project demonstrates how classic CNNs can be optimized for small-scale tasks in native environments.
1010
### Key Features:
1111

1212
* C++17 implementation for bare-metal performance
1313

1414
* Simplified AlexNet for 28×28 grayscale images
1515

16+
* Googlenet, Densenet, Resnet and Yolo11x-cls for images of any size
17+
1618
* Parallel computing via Intel OneTBB (Threading Building Blocks)
1719

18-
* Pre-trained model: AlexNet-model.h5 included
20+
* Pre-trained model: AlexNet-model.h5, Googlenet.onnx included
1921
## **Some files used to create the library**
2022
### Neural network models
2123
You need to download [Alexnet-model.h5](https://github.com/moizahmed97/Convolutional-Neural-Net-Designer/blob/master/AlexNet-model.h5) to the folder *docs*
@@ -30,9 +32,9 @@ Other models:</br>
3032

3133
## **How do I launch the inference?**
3234
* Make sure you install the project dependencies by running: *pip install -r requirements.txt*
33-
* You need to run the script *parser.py* that is located in app/AlexNet to read weights from a model *Alexnet-model.h5* and the json file with the weights will be stored in the *docs* folder.
35+
* You need to run the script *parser.py* that is located in app/converters to read weights from a model *Alexnet-model.h5* or *parser_onnx.py* to read weights from a models ONNX or YOLO and the json file with the weights will be stored in the *docs* folder.
3436
* Then put the test images in png format in the folder *docs/input*
35-
* After building the project, which is described below, run Graph_build in folder *build/bin*
37+
* After building the project, which is described below, run Graph_build with the parameter --model (alexnet_mnist or googlenet or densenet or resnet or yolo) and the parameter --parallel if you need. App Graph_build is located in folder *build/bin*
3638

3739
## **Building a Project**
3840
### *Windows*
@@ -69,7 +71,7 @@ To build and run this project locally on Windows, follow these steps:
6971
```
7072
and run the file
7173
```bash
72-
Graph_Build.exe
74+
Graph_Build.exe --model alexnet_mnist
7375
```
7476
### *Linux/macOS*
7577
To build and run this project locally on Linux or macOS, follow these steps:
@@ -116,7 +118,7 @@ To build and run this project locally on Windows, follow these steps:
116118
```
117119
and run the file
118120
```bash
119-
./Graph_Build
121+
./Graph_Build --model alexnet_mnist
120122
```
121123

122124
## Test Process
@@ -147,10 +149,14 @@ To start the testing process locally, you need to go to the directory
147149
./run_test
148150
```
149151

150-
## **Accuracy validation**
152+
## **Accuracy validation for Alexnet on MNIST**
151153
To run accuracy validation you need to use the MNIST dataset, which you can download [here](https://github.com/DeepTrackAI/MNIST_dataset/tree/main/mnist/test) and put it in a folder *docs/mnist/mnist/test*
152-
Now you can run accuracy check - *build\bin\ACC_MNIST.exe*
153-
* **The accuracy should be 98.02%**
154+
Now you can run accuracy check - *build\bin\ACC.exe --model alexnet_mnist*
155+
* **The accuracy should be 98.01%**
156+
157+
## **Accuracy validation for ONNX or YOLO models on ImageNet**
158+
To run accuracy validation you need to use the ImageNet dataset, which you can download [here](https://www.kaggle.com/datasets/sautkin/imagenet1kvalid) and put it in a folder *docs/Imagenet/*
159+
Now you can run accuracy check - *build\bin\ACC.exe --model googlenet*
154160

155161
## **Documentation of project**
156162
https://github.com/embedded-dev-research/ITLabAI/blob/Semyon1104/Final_documentation/docs/IT_Lab_2023.pdf

0 commit comments

Comments
 (0)