All Projects → Oleffa → Leagueai

Oleffa / Leagueai

Licence: gpl-3.0
LeagueAI software framework for League of Legends that provides information about the state of the game based on Image Recognition using OpenCV and Pytorch.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Leagueai

Person Detection And Tracking
A tensorflow implementation with SSD model for person detection and Kalman Filtering combined for tracking
Stars: ✭ 193 (+50.78%)
Mutual labels:  artificial-intelligence, object-detection, opencv
Yolo annotation tool
Annotation tool for YOLO in opencv
Stars: ✭ 17 (-86.72%)
Mutual labels:  object-detection, opencv
Tensorlayer
Deep Learning and Reinforcement Learning Library for Scientists and Engineers 🔥
Stars: ✭ 6,796 (+5209.38%)
Mutual labels:  artificial-intelligence, object-detection
Color Tracker
Color tracking with OpenCV
Stars: ✭ 128 (+0%)
Mutual labels:  object-detection, opencv
Opencvtutorials
OpenCV-Python4.1 中文文档
Stars: ✭ 720 (+462.5%)
Mutual labels:  object-detection, opencv
Imageai
A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
Stars: ✭ 6,734 (+5160.94%)
Mutual labels:  artificial-intelligence, object-detection
Object Detection And Location Realsensed435
Use the Intel D435 real-sensing camera to realize target detection based on the Yolov3 framework under the Opencv DNN framework, and realize the 3D positioning of the Objection according to the depth information. Real-time display of the coordinates in the camera coordinate system.ADD--Using Yolov5 By TensorRT model,AGX-Xavier,RealTime Object Detection
Stars: ✭ 36 (-71.87%)
Mutual labels:  object-detection, opencv
Vehicle counting tensorflow
🚘 "MORE THAN VEHICLE COUNTING!" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.
Stars: ✭ 582 (+354.69%)
Mutual labels:  object-detection, opencv
Computervision Recipes
Best Practices, code samples, and documentation for Computer Vision.
Stars: ✭ 8,214 (+6317.19%)
Mutual labels:  artificial-intelligence, object-detection
Keras Retinanet For Teknofest 2019
Using RetinaNet for object detection from drone images in Teknofest istanbul 2019 Artificial Intelligence Competition
Stars: ✭ 50 (-60.94%)
Mutual labels:  artificial-intelligence, object-detection
Trafficvision
MIVisionX toolkit is a comprehensive computer vision and machine intelligence libraries, utilities and applications bundled into a single toolkit.
Stars: ✭ 52 (-59.37%)
Mutual labels:  artificial-intelligence, object-detection
Robovision
AI and machine leaning-based computer vision for a robot
Stars: ✭ 126 (-1.56%)
Mutual labels:  artificial-intelligence, opencv
Openlabeling
Label images and video for Computer Vision applications
Stars: ✭ 706 (+451.56%)
Mutual labels:  object-detection, opencv
Dataaugmentationforobjectdetection
Data Augmentation For Object Detection
Stars: ✭ 812 (+534.38%)
Mutual labels:  object-detection, opencv
Deep Learning For Hackers
Machine Learning tutorials with TensorFlow 2 and Keras in Python (Jupyter notebooks included) - (LSTMs, Hyperameter tuning, Data preprocessing, Bias-variance tradeoff, Anomaly Detection, Autoencoders, Time Series Forecasting, Object Detection, Sentiment Analysis, Intent Recognition with BERT)
Stars: ✭ 586 (+357.81%)
Mutual labels:  artificial-intelligence, object-detection
Tensorflow object counting api
🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
Stars: ✭ 956 (+646.88%)
Mutual labels:  object-detection, opencv
Phormatics
Using A.I. and computer vision to build a virtual personal fitness trainer. (Most Startup-Viable Hack - HackNYU2018)
Stars: ✭ 79 (-38.28%)
Mutual labels:  artificial-intelligence, opencv
Openvino Yolov3
YoloV3/tiny-YoloV3+RaspberryPi3/Ubuntu LaptopPC+NCS/NCS2+USB Camera+Python+OpenVINO
Stars: ✭ 500 (+290.63%)
Mutual labels:  object-detection, opencv
Ai Basketball Analysis
🏀🤖🏀 AI web app and API to analyze basketball shots and shooting pose.
Stars: ✭ 582 (+354.69%)
Mutual labels:  artificial-intelligence, object-detection
Traffic Light Detector
Detect traffic lights and classify the state of them, then give the commands "go" or "stop".
Stars: ✭ 37 (-71.09%)
Mutual labels:  object-detection, opencv

LeagueAI

Implementation of an A.I. Player for the videogame League of Legends based on Image Recognition using PyTorch

Demo Video: https://youtu.be/iB4PoNJuXzc

Attention: The old version using Tensorflow can be found in the branch "LeagueAI_2017".

Attention: This project is still under development, the datasets I generate and the YOLOv3 object detection weights I trained will be made available soon!

OLD VERSION

This is a newer version of the old implementation and shall provide a framework that lets you build your own applications based on detecting objects in the game. As an example I will implement the old 2017 LeagueAI bot on this framework. Demo video of Tensorflow implementation from 2017: https://www.youtube.com/watch?v=KRWFCaXfOTk

TODO

  1. Dataset generation, add these objects to the raw data
  • Fix some bugs with the tower cropping of the raw data
  • Towers in fog of war
  • Turret plating
  • Fog of war strucutres, maybe fog of war filter?
  • Dead minions
  • Add random particles to the screenshots, explosions and so on
  • More different cursors
  • More cursors
  • health bars
  1. Other TODOs:
  • Extract object positions from the minimap to get an understanding of the global map.
  • The mAP calculation needs a rework, sometimes objects are used twice for map computation.

Currently Detectable Objects

  • Red Tower
  • Red Canon Minion
  • Red Caster Minion
  • Red Melee Minion
  • Vayne

Missing Objects

  • More champions
  • Add Red inhibitors, nexus, super minions
  • Add Blue towers, nexus, inhibitors, minions

Abstract

The task is to create an agent that is able to play 3rd person massive multiplayer online battle arena games (MOBA) like League of Legends, Dota 2 and Heroes of the Storm with the same input as a human player, namely vision. Since League of Legends does not provide an interface to the game, object detection is used. In this project a python implementation of Yolo v3 object detector and a way of randomly generating an infinite amout of training data is introduced.

Object detection

For more information on the object detector refer to my technical report at: https://arxiv.org/abs/1905.13546 or directly to the YOLOv3 website [2]

Installation/Usage

TODO

The LeagueAI Dataset

Creating large datasets from scratch can be very work intensive. For the first implementation of the LeageAI about 700 hand labeled pictures were used. Labeling 700 pictures took about 4 days of work and only included 4 game objects (1 champion model, allied and enemy minions and enemy towers). Therefore, the new dataset was created by automatically generating training data based on 3D models extracted from the game.

  1. Obtaining champion and minion models form 3D models To obtain the image data I used the online League of Legends model viewer from https://teemo.gg/model-viewer. For each ingame object and each animation I recorded a short video clip while rotating the 3D model. Next I used the pyFrameExporter.py script to extract individual pictures from the clips. For the minions I used Adobe After Effects to add a green background to the videos of the minions and towers (all objects where I could not find the 3D models). For each of the objects exported frames I used the pyExportTransparentPNG.py script. The script removes the green/purple background from the individual screenshots and leaves you with the masked png of an objects. Furthermore, the scrip crops the images to the content and removes excess seethrough space.

This leaves me with about 1000 masked images of each object that can be later used to generate labeled fake screenshots of the game.

  1. Combining the masked and cropped images with game background To generate a large amount of training data that cover all regions of the game map, I generated a series of 200 screenshots from all over the map using the frame exporter script. Then the masked and cropped images from step 1 are randomly combined with the map screenshots using the bootstrap.py script. Since the images are placed using a script it is possible to obtain the objects position in the image and thus automatically generate a label for it.

To generate a large variety of screenshots the script can be adjusted to:

  • change the random amount of champions, minions and other objects
  • randomly add a number of cursers
  • randomly add the game HUD to the screenshot
  • randomly scale all the objects
  • cluster the minions to create more realistic clumps of fighting minions
  • apply gaussian blur and random noise to the image

Using this method a dataset of many thousands of different labeled fake screenshots can be generated in a matter of hours.

A full description of the dataset generation process and evaluation compared to hand labeled data can be found in the following publication: https://arxiv.org/pdf/1905.13546.pdf

To cite please use:

@article{leagueaidatasetgeneration,
  title={LeagueAI: Improving object detector performance and flexibility through automatically generated training data and domain randomization},
  author={Struckmeier, Oliver},
  journal = {arXiv},
  year={2019}
}

Extracting health information

TODO

Sources

[1] Implementing Yolov3 object detection from scratch: https://github.com/ayooshkathuria/YOLO_v3_tutorial_from_scratch

[2] For training: https://pjreddie.com/darknet/yolo/, Yolov3: An Incremental Improvement, J. Redmond and A. Farhadi, 2018

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].