/gosee

Toy neural network for image recognizing from scratch in less than 200 lines of code.

Primary LanguageGoMIT LicenseMIT

License: MIT Go Report Card Build

Introduction

Toy neural network for image recognizing from scratch in less than 200 lines of code.

This research and development project is written to aid my personal quest to gain an in-depth understanding of deep learning. The project contains a simple two-layered neural network utilizing backpropagation for weight adjustments. This code should only be used for educational purposes.

Results

The neural network is able to predict if an image depicts pacman or not.

Image Prediction Certainty
yes 0.99
no 0.05

Image dimensions

The network evaluates blocks of 8 by 8 pixels. If you would like to use the network to predict a large image it is recommended to break the image up into 8 by 8 blocks, opposed to increasing the block size, for better results.

Build project

The command-line tool includes a make file that can build the tool for multiple platforms.

#compile and install package for Windows
make build-windows
#compile and install package for MacOs
make build-macos
#compile and install package for Linux
make build-linux