iCE40 UltraPlus Human Presence Detect Quick Start Guide
Application Note
© 2019 Lattice Semiconductor Corp. All Lattice trademarks, registered trademarks, patents, and disclaimers are as listed at www.latticesemi.com/legal.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
FPGA-AN-02005-1.1 3
Contents
Acronyms in This Document.................................................................................................................................................4
1.
Introduction
...................................................................................................................................................................5
1.1. Design Process Overview ....................................................................................................................................5
2. Machine Training and Creating Frozen File ..................................................................................................................7
2.1. Verifying TensorFlow and Tool Environment......................................................................................................7
2.2. Preparing the Dataset .........................................................................................................................................7
2.3. Training the Machine ..........................................................................................................................................8
2.4. Generating Frozen (*.pb) File............................................................................................................................10
3. Generating the Binary File ..........................................................................................................................................13
4. Programming the Bistream and Binary Files to HIMAX HM01B0 Upduino Shield Board ...........................................13
Technical Support Assistance .............................................................................................................................................14
Revision History ..................................................................................................................................................................15
Figures
Figure 1.1. Himax HM01B0 Upduino Shield Board ...............................................................................................................5
Figure 1.2. Lattice Machine Learning Design Flow ...............................................................................................................6
Figure 2.1. Tensorflow Installation Check.............................................................................................................................7
Figure 2.2. Dataset Image Size Check ...................................................................................................................................7
Figure 2.3. Dataset Folder Path Check..................................................................................................................................8
Figure 2.4. Dataset List, Image, and Label Data Path ...........................................................................................................8
Figure 2.5. Run Script File .....................................................................................................................................................8
Figure 2.6. Execute the script ...............................................................................................................................................9
Figure 2.7. Execute TensorBoard..........................................................................................................................................9
Figure 2.8. TensorBoard Interface........................................................................................................................................9
Figure 2.9. Checkpoint Data Files at Log Folder..................................................................................................................10
Figure 2.10. Latest Checkpoint Data Files...........................................................................................................................10
Figure 2.11. Create *.pbtxt File ..........................................................................................................................................10
Figure 2.12. Check *.pbtxt File ...........................................................................................................................................11
Figure 2.13. Rename and Copy Checkpoint Files................................................................................................................11
Figure 2.14. Running trainckpt2inferencepb.py .................................................................................................................11
Figure 2.15. Check Frozen File ............................................................................................................................................12