This is not really a JS post I mainly want to know if its possible to do something without JS. Using the information that can be found here https://cdnjs.cloudflare.com/ajax/libs/mnist/1.1.0/mnist.js I want to be able to input a number and extract a random image of that number. This would be quite simple with JS but due to the nature of making good projects I dont want to require people to enable JS for it to work. If anyone has any solutions please let me know.
Could you give an example of what your after?
Input “1” it will grab the 784 numbers used to draw the 28 x 28 image of a 1. Each number has a lot of images to it so it should grab a random 1.
Sounds like all it needs is the data in nested lists
e.g.
assemble the data
and then just lookup each number and pick a random set of 28x28 pixels
how do you get that data from the data returned from the url
I’d look into copy/pasting it and then parsing it into standard Snap! costume pixel format
no i want to do it on flag for memory reasons
Publicly available MNIST CSV dataset as provided by Joseph Redmon. The
mnist_train.csvfile contains the 60,000 training examples and labels. Themnist_test.csvcontains 10,000 test examples and labels. Each row consists of 785 values: the first value is the label (a number from 0 to 9) and the remaining 784 values are the pixel values (a number from 0 to 255).
II’ve drag & dropped those CSV files.
import them as a list of 10.000 and 60.000 elements.
As expected ![]()
Assuming you mean “on the fly” then maybe write a pre-processor program and store the data on separate MQTT topics on a (your own preferably) broker then you could read each image one at a time
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

