An open API service indexing awesome lists of open source software.

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)

Awesome Lists containing this project

README

          

# NCU Algorithm Term Project (1092)
[![Python](https://img.shields.io/badge/python-3.8.7-green)](https://www.python.org/doc/versions/)
[![Colab](https://img.shields.io/badge/Google%20Colab-1.0.2-green)](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
![](Documents/ResNet9%20Epoch35.png)

### ResNet 152 model

Batch size: 64
Epochs: 35
![](Documents/ResNet152%20Epoch35.png)

## 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

![](Documents/Res9.png)