farzaa / deepleague Goto Github PK
View Code? Open in Web Editor NEW(Open Source) Computer Vision + Deep Learning + League of Legends
(Open Source) Computer Vision + Deep Learning + League of Legends
Option to supply model image instead of video.
when I try the commond pythonw test_deep_league.py -out output youtube -yt https://www.youtube.com/watch?v=vPwZW1FvtWA -yt_path /output -start 0:00:30 -end 0:01:00
Traceback (most recent call last):
File "test_deep_league.py", line 164, in
yolo_model, _ = create_model(anchors, class_names)
File "/Users/xiaoyu/deeplearn/deeplol/YAD2K/retrain_yolo.py", line 351, in create_model
topless_yolo.load_weights(topless_yolo_path)
File "/Users/xiaoyu/miniconda3/envs/DeepLeague/lib/python3.6/site-packages/keras/engine/topology.py", line 2667, in load_weights
f, self.layers, reshape=reshape)
File "/Users/xiaoyu/miniconda3/envs/DeepLeague/lib/python3.6/site-packages/keras/engine/topology.py", line 3365, in load_weights_from_hdf5_group
str(len(filtered_layers)) + ' layers.')
ValueError: You are trying to load a weight file containing 129 layers into a model with 44 layers.
Hey! Great repo :-)
I was just wondering how did you generate the JSON you linked here: https://jsonbin.io/5a5fa15013a3b731a42f50af
Love this.
Steve
Your training data was downloaded as an extensionless file. How do you split it into the npz files you said you compressed into this single 30GB file?
I implement your code as your readme in my macbook. It seems ok until the last command 'pythonw test_deep_league.py -out output youtube -yt https://www.youtube.com/watch?v=vPwZW1FvtWA -yt_path /output -start 0:00:30 -end 0:01:00 ' Could you help me and thank you in advance!
DeepLeague currently just draws bounding boxes on an image and sends these to the "output/" folder.
I've had analysts contact me who have said it'd be much easier to have this data exported as a CSV file. In the test_deep_league.py
file you'll see this
out_boxes, out_scores, out_classes = sess.run( [boxes, scores, classes], feed_dict={.....
This is simply feeding an image to the neural network, which you don't really need to worry about. But you do need its output!
out_boxes
is the actual bounding box (top, left, bottom, right), out_scores
is the confidence score, and out_classes
is the champion label which will be a number. model_data/league_classes.txt
will tell you what champion this number corresponds to.
I know people have gotten this working by using an Ubuntu subsystem which comes with Windows 10, but it may be useful to get it working on normal old Windows.
Perhaps someone can create some instructions as others have done with the Ubuntu instructions. In the perfect world, there could just me a windows_enviroment.yml file (like the existing requirements.yml file for Ubuntu) and people can just do
conda env create -f windows_enviroment.yml
There's a reference to a locally stored file vod_info.csv in download_youtube.py. I assume this is the list of VOD for the training data. Could we add to the repo so this works?
CSV_FILE_PATH = '/Users/flynn/Documents/DeepLeague/data/vod_info.csv'
DeepLeague is open source and I'm happy people are already contributing.
If you have any ideas for DeepLeague, just create an issue and give it the "enhancement" label, doesn't matter how crazy it is! I want people to contribute new ideas and then me and others can work on them. The first step is always the idea and then people will get inspired to attack the problems.
And of course, if you find bugs or have issues then definitely create an issue.
The biggest current limitation of DeepLeague's AI is the lack of training data available for all champions due to the presence of limited champion pools from LCS games. A solution to expand and balance the data set to include all champions in the game is to alter the existing data set by changing the icons of each frame to the desired champions missing currently. Since the current data contains the positions of each icon on the map along with their corresponding champion a simple script could be created to alter the icons of each frame and corresponding champion name to a new champion icon and name. With this solution the training data could easily be doubled/tripled in size in order to include sufficient enough data for each champion. Another benefit is that the training data can be easily balanced without reducing the current amount of data by changing the icons of champions that appear too often in the current data.
The main issue with implementing this solution is keeping intact the current layering of overlap for champion icons when they are close together on the minimap(IE drawing the correct icon on top of the others). Luckily League's minimap follows a simple set of rules when deciding the layering of icons. Looking at a traditional LCS styling scoreboard with Blue side at the top and Red side on the bottom and player ordering following Top->Jungle->Mid->Bot->Sup, the minimap draws the icons from the top of the scoreboard to the bottom. So Blue top icon is drawn first followed by Blue jungle etc... with Red support being the last icon drawn. The only exception to this rule is when a player is backing shown by the blue or red circle around their icon. When a player backs, their icon becomes the first icon drawn regardless of where they fell in the previous list. The latest person to back is always the first icon drawn.
Hope this suggestion can help improve DeepLeague.
how to add all champion data ?
It throws access denied exception...
Hi there,
Thanks for your efforts with this model + dataset. I'm looking to use your dataset as part of training my own champions detection/tracking model and it should be a big help.
I would like to try and use temporal information to inform my model (i.e., feed the frames into an LSTM + Conv style model in sequential order), however it appears this information is absent from your dataset?
I downloaded the dataset from the torrent here: https://archive.org/details/DeepLeague100K
I see there is an sqlite file containing some metadata, but I can't make much sense of what the metadata is supposed to be.
Plus when I sequentially plot images from the dataset, it appears they are in a random order.
Do you possibly have timestamps for each of the frames in the dataset somewhere? Or is there some ordering I can apply so that the frames are sequential?
Cheers,
Liam
I think there are duplicate versions of retrain_yolo.py in the Data Scripts and YAD2K directories. Any reason these both need to exist? Should we remove the one in Data Scripts?
In the installation instructions, it says to download yolo.cfg, but this file does not exist, so the download request produces a 404 error. Is there an alternative?
Tensorflow 2 and higher have removed stuff from contrib and I believe this causes data building issues when running the python script yad2k.py.
My issue is when running
python yad2k.py yolo.cfg yolo.weights model_data/yolo.h5
I get
AttributeError: Module 'tensorflow' has no attribute 'space_to_depth"
DeepLeague outputs the coordinates of a champ relative to the mini-map cropped out of a 1080p video. This means that we can hard code the coordinates of the jungle camps on this map and actually figure out if a jungler is doing a camp. There would have to be some sort of rule where if the jungler is at a camp longer then 3 seconds, we can assume he's doing the camp. Some more thought would need to go into this part.
This can help to actually create the entire path the jungler took.
Hey guys,
Any ideas? Getting this error:
AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu'
Steve
It could have some inputs to change the arguments used by the CLI interface.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.