Skip to content

Latest commit

 

History

128 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Machine Learning

Examples with CNNs

Dependencies

Example for MNIST

Training a classification CNN

$ python example_convnet.py

image

At the end, you will have the folder "mnist_model" with the model saved.

Testing features learned by the CNN

Now, you can use the model for similarity search in other dataset like EMNIST-LETTERS. To test this example, please, download the emnist dataset in npy format from here.

After downloading you will have two files:

  • data/test_emnist_images.npy
  • data/test_emnist_labels.npy

Now, you can try this:

$ python ssearch_emnist.py

After running, you will have some image retrieval results. Please see the images named "result_.png". Examples of these results are:

result_1415

result_1047

result_4843

This shows that we can use a pretrained model for other different but similar problem. We say similar because images comes from the same nature. In this case, letters from emnist and digits from mnist are all handwritten symbols.

In addition, you can visualize the feature space projecting the original features to 2D points using UMAP (see umap_view.py). Below is an example of the space representation on emnist dataset.

emnist_plot

Required Data

-mnist_model -emnist_data

About

This is repository with many ML examples

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages