https://github.com/ppodds/ncualgorithmtermproject
NCU Algorithm Term Project (1092)
https://github.com/ppodds/ncualgorithmtermproject
cnn-classification keras python tensorflow2
Last synced: 3 months ago
JSON representation
NCU Algorithm Term Project (1092)
- Host: GitHub
- URL: https://github.com/ppodds/ncualgorithmtermproject
- Owner: ppodds
- Created: 2021-03-20T18:55:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-26T09:54:31.000Z (about 5 years ago)
- Last Synced: 2025-01-16T10:33:15.787Z (over 1 year ago)
- Topics: cnn-classification, keras, python, tensorflow2
- Language: Python
- Homepage:
- Size: 1.42 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NCU Algorithm Term Project (1092)
[](https://www.python.org/doc/versions/)
[](https://colab.research.google.com/drive/1OspRKKJob_opurnCR-IcOGrCxLRAmp0Z?usp=sharing)
A Chinese number classification AI based on ResNet 9 and ResNet 152.
## Requirements
This project is written by Python 3.8.7 . Following packages are need to be installed.
- tensorflow~=2.4.1
- pydot>=1.4.2
- numpy~=1.19.5
- Pillow~=8.1.2
## Installation
```shell script
git clone https://github.com/ppodds/NCUAlgorithmTeamProject.git
python -m pip install -r requirements.txt
```
## Usage
You can use Google Colab or run at your own computer. [Link](https://colab.research.google.com/drive/1OspRKKJob_opurnCR-IcOGrCxLRAmp0Z?usp=sharing)
If you want to use Colab, you should mount your own google drive (prepare dataset).
If you want to run this in your own computer, you should check your project structure is correct.
Check your dataset path is correct. The path is strictly required to be correct
## Screenshot (Running on Colab)
### ResNet 9 model
Batch size: 64
Epochs: 35

### ResNet 152 model
Batch size: 64
Epochs: 35

## Project Structure
```
project
│ README.md
│ .gitignore
│ requirements.txt
│
└───NumberDectect
│ main.py
│
│
└───ChineseNumDataset
│ │ train_image
│ │ validation_image
│ │ test_image
│
└───commands
│ │ __init__.py
│ │ evaluate.py
│ │ info.py
│ │ train.py
│
└───dataset
│ │ __init__.py
│
└───model
│ __init__.py
│ ResNet.py
│
└───layers
│ __init__.py
```
## ResNet Structure
### ResNet 9 model
[source](https://blog.csdn.net/yyyerica/article/details/86541473)
Layer Name
Output size
Detail
Conv1
28x28x16
3x3, 16, stride 1
Conv2
14x14x16
3x3, 16, stride 2 (shortcut)
Conv2
14x14x16
3x3, 16, stride 1
Conv3
7x7x32
3x3, 16, stride 2 (shortcut)
Conv3
7x7x32
3x3, 16, stride 1
Avg
1x1x32
7x7 average pool
Output
10
flatten, dense, softmax
