It's a simple CNN sample for bots.
There are 3 scripts. get_data.py takes a screenshot when you press a key and save it to the class's folder. There are 2 different classes(Up and Straight). Press Space for up, any key but space for straight. Train.py: trains the model. Play.py: loads and run the model. Of course, there are many better methods for such a problem but this project only made for educational purposes.
you can download HERE It's trained with ~2500 images.
pip install pynput
pip install mss
and of course tensorflow, keras, PIL.
python get_data.py
(press space for up, press any key but space for straight)
python train.py
python play.py