Projects   >   Machine Learning   >   Code samples   >   Coin Analyser
    Code Source
    Dataset structure
    Challenges / Solutions

In this sample neural network is used to analyze coin on photo upload by a user.
Neural network does following analysis for a photo/picture:
  • What coin is shown on the photo exactly. Point URL with exact description, photos, prices.
  • What is the coin denomination (e.g. 1 Dollar, 5 Lira). It's useful if exact classification is not correct.
  • What country the coin is belong to (e.g. Roman Empire, Venice, etc). It's useful if exact classification is not correct.
This project with minor modifications is used for coin classifications at

Here is short demo video.

Code Source
Checkout GitHub:

For this example is used neural network with one convolutional layer with max pooling and softmax output layer. Main advantage is fast training time with acceptable accuracy.

If you need more neural network prototypes check neural network prototypes.

Here they are:

If you like to try dataset with parameter not listed here - let me (pavlikovskiy{at} know - I can generate it and share.

Dataset structure
Algorithm Input: pre-processed photo
Output: existing coin number/id

Files - training set [ImgIdx, CoinIdx] - cross validation set [ImgIdx, CoinIdx]
coin.tst.csv - test set [ImgIdx, CoinIdx]
coin.all.csv - bridge table between data and input for NN.
Fields: [chnCoinId, chnCiId, chnImgId, ImgIdx, setType, CoinIdx]

img_color/ - directory with color images. File name format is [ImgIdx].jpg
img_grayscale/ - directory with grayscale images. File name format is [ImgIdx].jpg
img_gau/ - directory with images in 'difference of gaussians'. File name format is [ImgIdx].jpg
img_unlabeled/ - unlabeled images (can be used for unsupervised learning)

Input images are created from original images using tiny artificial transformation (obverse-reverse swap, tiny rotations, ...). For every original image 7 - 300 artificial images are created (depends on input generator settings).

Powered by ESG