Based on the image recognition, the model that I create with 1,500 pictures is able to detect the enemy on League of Legends and makes ezreal shot "Q" to the enemy on the coordinate of x and y axis.
I respectively save 500 images of Tower, Minion, and Ezreal on League of Legends (Total 3 classes)
- Used parser or tf.run.flags to insert width, height, and filename
- Used cv2 to take each 500 pictures
- Saved those pictures with np.save(The size of .npy is 233.4 mb)
:Used AWS to use GPU that has p2.x2large to operate model. I have used 3540 epochs on GPU based on Object Detection.
- You can install some packages, tensorflow, argparse, pillow, and numpy
pip install -r requirement.txt
- To create .npy and 500 pictures, use tf_save_image.py
python tf_save_image.py --filename LOL_data.npy
-
If you run it, the file LOL_data.npy on the folder of data is created and 1,500 images are saved on the image folder of images.
-
To seperate LOL_data.npy into two groups, train_data and image_data, you might as well use tf_load_image.py
python tf_load_image.py --filename LOL_data.npy
- To create a model, you might use model.py that has CNN mode(I used early-stopping with patience = 5 and made the model stopped actumatically, also made use of Dataset API)
python model.py
python prediction.py
-
To make the box on the picture, ImageGrab on Pillow and Tensorflow Object Detection API might be used to detect ezreal, tower, and minion
-
To detect and controll ezreal automatically, you might use contoller.py
python controller.py