Control computer car games with your palm
Palm images are used to extract the HOG features. Then SVM is used to train those features. If palm is found in the boxes,appropriate command was sent to game using pyautogui.
Use the config.json file in detector/configuration to configure input/output paths and SVM, HOG parameters.
Run detector/train.py to train the model. Run control_game.py to start the application. In the mean time open the game you want and configure the following in the game,
- up arrow button - accelarate
- down arrow button - stop/reverse
- left arrow button - move left
- right arrow button -move right
Note:
- if you want to train your own dataset, use annotaion XML files in PASCAL VOC format, so that dataset/annotations.py can extract informations from it.
- if you want to get samples images from use dataset/get_images_from_video.py to get frames from video
Lessons learnt,
- For SVM we dont need huge data like deep learning. As the data increases, model size will increase.
- Some times we can go for fixed windows instead of sliding windows, if usecase permits.
- Multiprocessing beacomes saviour at times (as multithreading is not our piece of cake- GIL)
- Change my old laptop!