The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Guruprasad B.R. (15) [Avatar] Offline
#1
Chapter 3 Modeling and prediction

3.2.3 Classification with multiple classes


Can you provide more details on how an image (taken from a mobile/camera) can be converted into a data format similar to the
test data given in mnist_small.csv ?
henrik.brink (22) [Avatar] Offline
#2
Hi there!

If you use Python, I'd recommend the Scikit-Image library: http://scikit-image.org

To read in an image from a file, for example, you'd call the imread function:

from skimage.data import imread

image = imread("/path/to/file.jpg")


The image variable will now be a Numpy array that you can use as training data or transform further. Look at the documentation here:

http://scikit-image.org/docs/stable/api/skimage.data.html#imread

Let me know if you have any further questions on this, and thanks for reaching out!

- Henrik
Guruprasad B.R. (15) [Avatar] Offline
#3
Thanks for the quick response.