Coder Social home page Coder Social logo

oleffa / leagueai Goto Github PK

View Code? Open in Web Editor NEW
222.0 222.0 66.0 371.67 MB

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

License: GNU General Public License v3.0

Python 27.30% Makefile 0.23% TeX 72.47%
artificial-intelligence leageuoflegends object-detection opencv python pytorch

leagueai's People

Contributors

ericheung avatar oleffa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leagueai's Issues

can you provide your python virtualenv?

  • I run the LeagueAI , and then it throw an exception as flow.
  • I don't know which version of MSS is correct.
2018-10-14 13:08:48.478820: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Traceback (most recent call last):
  File "C:\Users\root\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\182.4505.26\helpers\pydev\pydevd.py", line 1664, in <module>
    main()
  File "C:\Users\root\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\182.4505.26\helpers\pydev\pydevd.py", line 1658, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Users\root\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\182.4505.26\helpers\pydev\pydevd.py", line 1068, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:\Users\root\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\182.4505.26\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:/Users/root/studyProject/LeagueAI/LeagueAI.py", line 806, in <module>
    main_routine()
  File "C:/Users/root/studyProject/LeagueAI/LeagueAI.py", line 485, in main_routine
    sct.get_pixels(mon)
AttributeError: 'MSS' object has no attribute 'get_pixels'
```

Singular matrix error

I don't know if you are still working on it but I keep having this error raised. The only thing I modified was the window and monitor resolution to 1920x1080. I've also been running the py file instead of the ipynb, so I don't know if it's a specific problem with the py file itself. Thanks


Traceback (most recent call last):
File "C:/Users/hudso/Desktop/Machine learning/object detection test/models/research/object_detection/LeagueAI-Oleffa/LeagueAI.py", line 655, in
estimate_policy_gradient_FD()
File "C:/Users/hudso/Desktop/Machine learning/object detection test/models/research/object_detection/LeagueAI-Oleffa/LeagueAI.py", line 309, in estimate_policy_gradient_FD
policy_grad = ((inv((delta_theta.reshape((-1,4)).T).dot(delta_theta.reshape((-1,4))))
File "C:\Users\hudso\Anaconda3\lib\site-packages\numpy\linalg\linalg.py", line 551, in inv
ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
File "C:\Users\hudso\Anaconda3\lib\site-packages\numpy\linalg\linalg.py", line 97, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.LinAlgError: Singular matrix

hello

how can I test this? would like to test it and give you some feedback. seen like interesting project.

Regards.-

2022 error - unable to draw

This happens when installing a fresh clone of this repo and entering a practice game as vayne
I am using one of the yolo default weights as the LeagueAI weights

Traceback (most recent call last):
  File "C:\Users\Sylar6\PycharmProjects\LeagueAI\LeagueAI_minimal_example.py", line 28, in <module>
    objects = LeagueAI.get_objects(frame)
  File "C:\Users\Sylar6\PycharmProjects\LeagueAI\LeagueAI_helper.py", line 136, in get_objects
    list(map(lambda x: self.draw_results(x, input_frame, colors), output))
  File "C:\Users\Sylar6\PycharmProjects\LeagueAI\LeagueAI_helper.py", line 136, in <lambda>
    list(map(lambda x: self.draw_results(x, input_frame, colors), output))
  File "C:\Users\Sylar6\PycharmProjects\LeagueAI\LeagueAI_helper.py", line 154, in draw_results
    cv2.rectangle(img, c1, c2,color, 2)
cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function 'rectangle'
> Overload resolution failed:
>  - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
>  - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
>  - Can't parse 'rec'. Expected sequence length 4, got 2
>  - Can't parse 'rec'. Expected sequence length 4, got 2


Process finished with exit code 1

Training the object detector

Hi,

This project is pretty interesting. I was wondering how you obtained the labeled image data set and perform the training to get the object detector model. As there are multiple objects that could be found on any given screen capture throughout the game play, I don't have much idea on how to accomplish it. The riot developer API also doesn't seem to have the functionality for you to query useful information on the map at any given time. Would you mind sharing some insights?

Getting the weights

Really love this project, and fine it really fascinating. I pulled it and wanted to try and get simple examples working. Unfortunately the weights are not on the repo (at least that I can find). Is there a way I can get them from you?

Missing 'utils'

It appears that a library that you wrote called 'utils' is not included in the GitHub repo, and I cannot build the LegueAI.py file

Errors

I got these errors when I ran the Module

`Warning (from warnings module):
File "..\object_detection\utils\visualization_utils.py", line 25
import matplotlib; matplotlib.use('Agg') # pylint: disable=multiple-statements
UserWarning:
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

The backend was originally set to 'TkAgg' by the following code:
File "", line 1, in
File "C:\Program Files\Python36\lib\idlelib\run.py", line 144, in main
ret = method(*args, **kwargs)
File "C:\Program Files\Python36\lib\idlelib\run.py", line 474, in runcode
exec(code, self.locals)
File "C:\tensorflow1\models\research\LeagueAI\LeagueAI.py", line 20, in
from matplotlib import pyplot as plt
File "C:\Users<name>\AppData\Roaming\Python\Python36\site-packages\matplotlib\pyplot.py", line 71, in
from matplotlib.backends import pylab_setup
File "C:\Users<name>\AppData\Roaming\Python\Python36\site-packages\matplotlib\backends_init_.py", line 16, in
line for line in traceback.format_stack()

Traceback (most recent call last):
File "C:\tensorflow1\models\research\LeagueAI\LeagueAI.py", line 73, in
serialized_graph = fid.read()
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 119, in read
self._preread_check()
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 79, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: LeagueAI_v3/frozen_inference_graph.pb : The system cannot find the path specified.

; No such process`

Can someone help me fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.