Low-Cost Raspberry Pi based system for diffuse dataset generation
Authors/Creators
- 1. Departamento de ciencias exactas y tecnología, Centro universitario de los Lagos, Universidad de Guadalajara, Enrique Díaz de León 1144, Lagos de Moreno, Jal, 47463
- 2. División de Estudios de Posgrado e Investigación, Tecnológico Nacional de México campus León, Priv. Tecnológico S/n, Industrial Julian de Obregon,León, Gto, 37290.
- 3. Center for Biomedical Technology, Universidad Politecnica de Madrid, Campus Montegancedo, 28223, Pozuelo de Alarcon, Madrid, Spain
Description
Low-Cost Raspberry Pi based system for diffuse dataset generation
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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
Assembly and installation
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In order to assembly the Low-Cost Raspberry Pi based system for diffuse dataset generation 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.
Figure (A,B,C) RaspPi_support_1.STL, RaspPi_support_2.STL ,RaspPi_support_3.STL
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 "software usage" 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 (refer to figure D to see how to glue the pieces) 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.
Figure D. Assembly model
Figure E. Reference when the assembly is finished
Software usage
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In order to use the system the Raspberry Pi OS 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 Raspberry Pi OS is installed. Download the next files into the Raspberry Pi:
- t2.py
- generateDs.py
- train-images-idx-ubyte (MNIST dataset)
NOTE: the files listed above must be in the same directory.
Now, the next step is install this modules:
- numpy
- idx2numpy
- matplotlib
- PIL
- PiCamera
for the installation the next comands can be used:
sudo apt-get install python3-numpy
sudo pip install idx2numpy
sudo pip install matplotlib
sudo pip install pillow
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:
sudo python3 generateDS.py testDataset input testImgs 0 10 black
NOTE: the directory and subdirectories must be created before run the above command.
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: "actual_directory/testDataset/input/" 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.
Files
Files
(47.3 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:57d43c056ebff2d048a2be27e4316739
|
612 Bytes | Download |
|
md5:2312a7f8bc9c944dcc10cdf639fef979
|
209 Bytes | Download |
|
md5:104d944c475ec34d5f0b32924536b997
|
104 Bytes | Download |
|
md5:24c50f38236ade56bc36c2efd258198d
|
1.7 kB | Download |
|
md5:cca224215d8932907b10491038d95d84
|
54.4 kB | Download |
|
md5:c0a97388cb72f1f1610237bc2a0fe69f
|
33.5 kB | Download |
|
md5:be4e07003ffc9abd8eea2aa0f8ab8171
|
37.5 kB | Download |
|
md5:75d14b44d60b2f9b3accb5c2019da0e4
|
2.7 kB | Download |
|
md5:0e9b0bcf39b39fc9e89096b9319771db
|
49.9 kB | Download |
|
md5:605d96287066138410e73ce6c6d5bdc1
|
34.7 kB | Download |
|
md5:3f300d6204b0c819e1bd8e89068ed3b2
|
230 Bytes | Download |
|
md5:fb24f4ccdc93d132ec23baecbe982a8e
|
2.0 kB | Download |
|
md5:6bbc9ace898e44ae57da46a324031adb
|
47.0 MB | Download |