Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The function of this project use AMG8833 infrared sensor to recognize different gesture states.

...

The train gesture pictures and obtain tensorflow model files can be implement in the Windows PC..


1.1   PC work environment setup


a)      Download and run python-3.7.7-amd64.exe to install python
b)     Download and run opencv-4.3.0-vc14_vc15.exe to install opencv
c)      After install python, run "pip3 install tensorflow" to install tensorflow
After the installation complete, execute python->import tensorflow/import cv2 in the dos command window to check whether the installation is correct, as shown below:

1.2   The train.py file

a)      num: the gesture number. If you want add the gesture type please modify this variable.
b)     The name of the folder storing the gesture pictures must be increased in sequence with "a", "b", "c"...
c)      The image suffix must end in .jpg

1.3   Model training

Put the pictures of different gestures obtained through the SP7021 platform to together with train.py. The default requirement is to store 6 folders of a/b/c/d/e/f. The gesture pictures stored in the folder a/b/c/d/e/f and the corresponding pictures are list as below:
Folder a: forward action
Folder b: intermediate action
Folder c: backward action
Folder d: idle state (no gesture detected)
Folder e: upward movement
Folder f: upward preparation


The 6 folders of pictures put together with train.py.

Execute "python train.py" in dos command window to train data. After the training is completed, the model file hand.tflite will be generated.
 

...

b) Enable i2c port in sp7021-bpi-f2s.dts of linux source code

Please connect to Sunplus Yocto server to get SP7021 source bin file and package. PLUS1 Yocto. (http://113.196.136.132/)


c) Copy the 5 boot files of SP7021 to the boot partition of the sdcard

...


a)      Test mode :run   ./themal_cam temp_L temp_H hand.tflite

Parameter Description:
·        temp_L:Minimum temperature
·        temp_H:Maximum temperature
·        hand.tflite:Model files generated by training on the PC side based on the collected pictures

...