Yes, with this clock, I can’t live without MNIST handwritten datasets.

Heart of the Machine by Dheera Venkatraman and Jamin.


We’re used to clocks made of tubes in ancient times. In the age of AI, is there a more modern way to display time? Yes, the data set can also be turned into a clock, with MNIST writing numbers every morning to wake you up for the day.

MNIST is an ageless classic of computer vision, destined to go down in history as the first generation of convolutional neural networks shine on this handwritten digital dataset.




Although computer vision has long gone out of the era of MNIST data sets, even ImageNet with more than 10 million images is no longer a very large image data set. However, MNIST is still not to be ignored. It was the first data set for the introduction to deep learning and the first experiment to validate algorithms. It’s even used in Hinton’s data set to test the idea of Capsule.


If you wanted to pay tribute to the pioneers of such datasets, how would you do it? At GitHub, Machine Heart found an interesting little project where author Dheera Venkatraman made a clock with numbers sampled from the MNIST dataset.


Project address: github.com/dheera/mnis…


That is, a random drawing of 10,000 different handwritten numbers 24 hours a day. The result looks like this:



All it takes is a simple circuit board and four e-ink screens. Here’s what it looks like on the back:




hardware


TinyPICO development board was used in the project; A compact ESP32 board with plenty of GPIO pins, 4MB flash memory, Wi-Fi, and much more. TinyPICO is arguably the smallest development board based on esp32-Pico-D4 in the world, and the 240 MHz 32-bit dual-core processor is more than enough for our calculations.


Four e-Link digital displays. E-link was chosen because it fits the concept of handwritten numbers, works in all light conditions and doesn’t bother anyone. Waveshare’s e-Link display is mostly SPI, although there are some extra pins. Most people would like to have only one SPI and one CS pin, but more linkers are necessary. Here is the connection diagram for the ESP32. Roll the wire according to this.

The authors used two 10-pin JST-EH connectors on TinyPICO. Jst-eh uses a lower configuration than JST-XH, is more suitable for insertion, and is shorter and safer than standard pins.

TinyPICO to which the JST-EH connector is connected



Here, see the hardware attached to the 3D-printed case, and you’re done:

If the reader is not familiar with the hardware, don’t worry, we just follow the hardware given by the project author and assemble it. We’ll cover the cost of all the “gear” and the design drawings provided by the author later.


software


Project author Dheera Venkatraman says he often writes C++ or C, but he’s very interested in MicroPython, so that’s what he used for this project.


The project authors used a grayscale depth of 2 bits per pixel to represent MNIST handwritten numbers. A 28 by 28 pixel image at this bit depth requires only 196 bytes, so a 4MB flash memory can satisfy the entire MNIST validation set. If you want to fit the entire data set, you can just switch to a larger microcontroller, or use 1-bit depth images, or use compression methods, etc.


Place all files in/code in the TinyPICO root directory. The correct file should look something like the following.

In addition, we need to create a.wifi file for Wi-Fi and write yourSSId and yourpassword in the middle. The code to read the wifi Settings is shown below.




Project author Dheera Venkatraman has all the code files available on GitHub, and the code for printing the clock numbers is very readable. Even kinder, the author’s code provides very well-commented, basic and important statements that can be interpreted.




Be realistic. How much does it cost to make one?




In terms of hardware, the main cost seems to be the TinyPICO development board and four e-Ink screens. First of all, TinyPICO can be bought on Taobao and other foreign websites. The foreign price is 20 dollars, while the price on Taobao is 235 yuan, and the shipping cost is about the same. In addition, readers can also choose a dedicated component store, which is also priced at around 200 yuan.

Secondly, an e-Ink screen is about 24 US dollars, although you can’t find it on Taobao, but it is much cheaper in domestic component stores, only 92 yuan for a piece, maybe there is a large demand for it in raspberry parties.

Other costs are less, wire, connector clock packaging is relatively easy to obtain, in the domestic component mall can also be bought once. If the reader wants to 3D print the outer package, the author also provides specific printing parameters. So, overall, the production cost should be less than 650 yuan, and the development board and electronic screen can be reused in other projects.




Perhaps we can also improve on the implementation of the project’s authors by implementing a digital clock on a large ink screen, directly using the more commonly used Raspberry PI as the motherboard (which uses much more power than TinyPICO), and implementing more capabilities such as sampling a CIFAR-10 in real time as the background. All in all, there’s a lot more to play with the MNIST digital clock.


Finally, all hardware and software details are available in the original project. In addition, it is worth mentioning that Dheera Venkatraman is also a very interesting little brother who cycled 1600 km from Hangzhou to Beijing along the longest man-made river in human history.


Last But Not Least


Indeed, the time when MNIST stood at the center of the stage has passed, but its role still cannot be ignored, and there are still many researchers dedicated to improving and repairing it, making unique contributions.


In 2017, Zalando, a German Fashion technology company, provided the Fashion MNIST dataset, whose size, format and training set/test set partition were exactly the same as the original MNIST, and we didn’t need to change any code to migrate from MNIST to it.



Last June, NYU and Facebook researchers reconstructed and expanded the MNIST dataset, adding 50, 000 new samples to the test set, bringing it to 60, 000. “If you use the original MNIST test set many times, your model may have already been fitted on the test set, and it’s time to try it out on the new sample,” says Yann LeCun, one of the authors of MNIST.




MNIST will always be a living history, whether it is to make MNIST into a beautiful and fun project in our daily life, or to enhance the capabilities of the dataset itself