You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
7
+
### Key Features:
8
+
9
+
* C++17 implementation for bare-metal performance
10
+
11
+
* Simplified AlexNet for 28×28 grayscale images
12
+
13
+
* Parallel computing via Intel OneTBB (Threading Building Blocks)
14
+
15
+
* Pre-trained model: AlexNet-model.h5 included
16
+
## **Some files used to create the library**
17
+
### Neural network models
18
+
You need to download [Alexnet-model.h5](https://github.com/moizahmed97/Convolutional-Neural-Net-Designer/blob/master/AlexNet-model.h5) to the folder *docs*
19
+
20
+
## **How do I launch the inference?**
21
+
* Make sure you install the project dependencies by running: *pip install -r requirements.txt*
22
+
* 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.
23
+
* Then put the test images in png format in the folder *docs/input*
24
+
* After building the project, which is described below, run Graph_build in folder *build/bin*
25
+
26
+
## **Building a Project**
8
27
### *Windows*
9
28
To build and run this project locally on Windows, follow these steps:
10
29
@@ -35,11 +54,11 @@ To build and run this project locally on Windows, follow these steps:
35
54
6. **Run the project**
36
55
After building the project, you can find the executable file in the following path from the *build* folder
37
56
```bash
38
-
cdapp\Release
57
+
cdbuild/bin
39
58
```
40
59
and run the file
41
60
```bash
42
-
Reader.exe
61
+
Graph_Build.exe
43
62
```
44
63
### *Linux/macOS*
45
64
To build and run this project locally on Linux or macOS, follow these steps:
@@ -86,9 +105,10 @@ To build and run this project locally on Windows, follow these steps:
86
105
```
87
106
and run the file
88
107
```bash
89
-
./Reader
108
+
./Graph_Build
90
109
```
91
-
# Test Process
110
+
111
+
## Test Process
92
112
This project contains tests to verify functionality.
93
113
To test the project, the Google Test Framework is used as a submodule of the project.
94
114
### Google Test Framework
@@ -99,7 +119,7 @@ To build and run this project locally on Windows, follow these steps:
99
119
100
120
To start the testing process locally, you need to go to the directory
101
121
```bash
102
-
cdtest\Release
122
+
cdbuild/bin
103
123
```
104
124
and run the following files:
105
125
```bash
@@ -115,18 +135,13 @@ To start the testing process locally, you need to go to the directory
115
135
chmod +x run_test
116
136
./run_test
117
137
```
118
-
# **Some files used to create the library**
119
-
### *neural network models*
120
-
You need to download [Alexnet-model.h5](https://github.com/moizahmed97/Convolutional-Neural-Net-Designer/blob/master/AlexNet-model.h5) to the folder *docs*
121
-
122
-
# **How do I launch the inference?**
123
-
* Make sure you install the project dependencies by running: *pip install -r requirements.txt*
124
-
* 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.
125
-
* Then put the test images in png format in the folder *docs/input*
126
138
127
-
# **Accuracy validation**
139
+
## **Accuracy validation**
128
140
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*
129
141
Now you can run accuracy check - *build\bin\ACC_MNIST.exe*
0 commit comments