Low-Cost Raspberry Pi based system for diffuse dataset generation
Creators: name: Soriano-Garcia, Miguel S.
name: Coutiño, Roger Chiu
name: Zarate, Roger Chiu
name: Gutiérrez-Hernández, David
name: R. Sevilla-Escoboza
name: Garcia-Predero, Angel
Publisher: name: Zenodo
Year: 2023
Subjects: Low-Cost system
Diffuse Dataset Generator
Raspberry Pi

description: <strong> Low-Cost Raspberry Pi based system for diffuse dataset generation</strong> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This respository contains 2 types of files: 4 STL files ( for 3D printing of the model ) 2 Python files ( For automated use of the system ) 1 train-images-idx-ubyte (MNIST dataset) Instructions for usage are diveded into two different sections on this document: Assembly and installation Software usage <strong>Assembly and installation</strong> <strong>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</strong> In order to assembly the <strong>Low-Cost Raspberry Pi based system for diffuse dataset generation </strong>needed to print the next files: RaspPi_support_1.STL RaspPi_support_2.STL RaspPi_suport_3.STL The files mentioned above looks like the next figures. <em> Figure (A,B,C) RaspPi_support_1.STL, RaspPi_support_2.STL ,RaspPi_support_3.STL</em> As well as the following items will be necessary to end the assembly: Raspberry Pi 3 B+ or higher Raspberry Pi camera module V2 30 mm DC Fan 32 GB or higher MicroSD with operative system (see section <em>"software usage"</em> to install the operative system) Once the above steps are finished the pieces RaspPi_support_1, RaspPi_support_2, and RaspPi_support_3 must be joined using Loctite (R) super glue (<em>refer to figure D to see how to glue the pieces</em>) following the instructions of the adhesive to complete the glue. When the pieces are joined, complete the assembly just as shown in the figure D. <em> Figure D. Assembly model</em> <em> </em> <em>Figure E. Reference when the assembly is finished </em> <strong>Software usage</strong> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to use the system the<em> Raspberry Pi OS</em> must be installed into the Micro SD card. To do this, follow the step listed in the official web site of Raspberry: https://www.raspberrypi.com/software/ Once the<em> Raspberry Pi OS </em>is installed. Download the next files into the Raspberry Pi: t2.py generateDs.py train-images-idx-ubyte (MNIST dataset) <strong><em>NOTE: the files listed above must be in the same directory.</em></strong> Now, the next step is install this modules: numpy idx2numpy matplotlib PIL PiCamera for the installation the next comands can be used: <pre><code class="language-bash">sudo apt-get install python3-numpy </code></pre> <pre><code class="language-bash">sudo pip install idx2numpy</code></pre> <pre><code class="language-bash">sudo pip install matplotlib</code></pre> <pre><code class="language-bash">sudo pip install pillow</code></pre> When all the modules mentioned are installed the system should workk in the correct way. To use the system the generateDS.py file must be call. This script revices several arguments: Folder Name (Name of the directory when the dataset will be created) SubFolder Name (Name of subderectory can be input or target ) Images Names (Name of the image in the dataset follow of a index) Start Index (Start Index of instance in the original dataset MNIST for this use case) Number of images (Total of image that will be created) Color Map(Change the color of the projected character between "red" and "black" only for the MNIST dataset) Usage example: <pre><code class="language-bash">sudo python3 generateDS.py testDataset input testImgs 0 10 black</code></pre> <strong>NOTE: the directory and subdirectories must be created before run the above comman</strong>d. This command will create 10 files corresponding to the first 10 MNIST characters storage into the idxFile, the files will be create in the next path: <em> "actual_directory/testDataset/input/" </em>and inside of this path mus be 10 files called testImgs0.jpg, testImgs1.jpg, .... , testImgs9.jpg In order to create diffuse or not diffuse image you must to remove or put the diffuser and repeat the process.