Giter Site home page Giter Site logo

flowtter / crispy Goto Github PK

View Code? Open in Web Editor NEW
77.0 6.0 5.0 48.22 MB

Crispy is a machine-learning algorithm to make video-games montages efficiently. It uses a neural network to detect highlights in the video-game frames

Home Page: https://crispy.gyroskan.com/

License: MIT License

Shell 0.69% Python 74.90% Dockerfile 0.26% CSS 0.50% HTML 0.23% JavaScript 4.01% Svelte 19.37% Batchfile 0.04%
ai computer-vision ffmpeg game machine-learning machine-learning-algorithms python riot riotgames valorant

crispy's Introduction

Bonjour ! ๐Ÿ‘‹

My name is Brice PARENT. I'm Currently studying at @EPITA and working at @DataDog.

def say_hello(key :str):
    return list(map(ord, key))

>>> say_hello(reverse_engineer_me)
[72, 101, 108, 108, 111, 44, 32, 109, 121, 32, 110, 97, 109, 101, 32, 105, 115, 32, 66, 114, 105, 99, 101, 32, 80, 65, 82, 69, 78, 84, 44, 32, 73, 32, 97, 109, 32, 97, 110, 32, 117, 112, 99, 111, 109, 105, 110, 103, 32, 102, 117, 108, 108, 115, 116, 97, 99, 107, 32, 100, 101, 118, 101, 108, 111, 112, 101, 114]


crispy's People

Contributors

curranzach avatar dawhn avatar flowtter avatar gyroskan 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

crispy's Issues

AxiosError: NetworkError

After starting the frontend I get AxiosError: NetworkError and none of the clips ive put in the resource folder are shown
Operating System: Windows 10
Python Version: 3.1

Axios Error: Network Error

After clicking on run.BAT, my cmd opens and shuts itself down within the span of a second, it's basically impossible to see what happened. I downloaded ffmpeg properly, and followed the other procedures, am I doing something wrong?

setup.bat throws an error

ERROR: Exception:
Traceback (most recent call last):
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\cli\req_command.py", line 245, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\commands\install.py", line 377, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
           ^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
    return bool(self._sequence)
           ^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
    return any(self)
           ^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
    candidate = func()
                ^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 182, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 228, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 290, in __init__
    super().__init__(
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
    self.dist = self._prepare()
                ^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 222, in _prepare
    dist = self._prepare_distribution()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 301, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\operations\prepare.py", line 525, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\operations\prepare.py", line 640, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\operations\prepare.py", line 71, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\distributions\sdist.py", line 54, in prepare_distribution_metadata
    self._install_build_reqs(finder)
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\distributions\sdist.py", line 124, in _install_build_reqs
    build_reqs = self._get_build_requires_wheel()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\distributions\sdist.py", line 101, in _get_build_requires_wheel
    return backend.get_requires_for_build_wheel()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_internal\utils\misc.py", line 745, in get_requires_for_build_wheel
    return super().get_requires_for_build_wheel(config_settings=cs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 166, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Czekoloczek\Gry\Python 3.12.1\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Users\karka\AppData\Local\Temp\pip-build-env-v1q5iwqs\overlay\Lib\site-packages\setuptools\__init__.py", line 10, in <module>
    import distutils.core
ModuleNotFoundError: No module named 'distutils'

For the full console log go here: https://pastebin.com/KmGuPaC6

pip is not recognized

image_2024-02-06_013149519

hey when i start the setup batch file this comes up pressing any key crashes it instantly, i appreciate any help

setup.bat error windows 11

C:\Users\philip\Downloads\windows\windows>pip install -Ir requirements.txt
Collecting https://github.com/Refty/thingy/archive/bb8565a25a428b1d607aa65111552fb3e12f2a12.zip (from -r requirements.txt (line 3))
Using cached https://github.com/Refty/thingy/archive/bb8565a25a428b1d607aa65111552fb3e12f2a12.zip
Preparing metadata (setup.py) ... done
Collecting https://github.com/Refty/mongo-thingy/archive/0e32be38391b2ed4b369641996384eb94be60c7c.zip (from -r requirements.txt (line 6))
Using cached https://github.com/Refty/mongo-thingy/archive/0e32be38391b2ed4b369641996384eb94be60c7c.zip
Preparing metadata (setup.py) ... done
Collecting fastapi==0.75.2 (from -r requirements.txt (line 8))
Using cached fastapi-0.75.2-py3-none-any.whl.metadata (24 kB)
Collecting python-multipart==0.0.5 (from -r requirements.txt (line 9))
Using cached python-multipart-0.0.5.tar.gz (32 kB)
Preparing metadata (setup.py) ... done
Collecting uvicorn==0.17.6 (from -r requirements.txt (line 10))
Using cached uvicorn-0.17.6-py3-none-any.whl.metadata (6.2 kB)
Collecting python-dotenv==0.10.3 (from -r requirements.txt (line 11))
Using cached python_dotenv-0.10.3-py2.py3-none-any.whl.metadata (15 kB)
Collecting motor==3.1.1 (from -r requirements.txt (line 12))
Using cached motor-3.1.1-py3-none-any.whl.metadata (7.3 kB)
Collecting ffmpeg-python==0.2.0 (from -r requirements.txt (line 15))
Using cached ffmpeg_python-0.2.0-py3-none-any.whl.metadata (1.7 kB)
Collecting Pillow==9.4.0 (from -r requirements.txt (line 16))
Using cached Pillow-9.4.0.tar.gz (50.4 MB)
Preparing metadata (setup.py) ... done
Collecting numpy==1.24.1 (from -r requirements.txt (line 17))
Using cached numpy-1.24.1.tar.gz (10.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

ร— Getting requirements to build wheel did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> [33 lines of output]
Traceback (most recent call last):
File "C:\Users\philip\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\philip\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\philip\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "C:\Users\philip\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\philip\AppData\Local\Programs\Python\Python312\Lib\importlib_init
.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in load_unlocked
File "", line 995, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Users\philip\AppData\Local\Temp\pip-build-env-l3k0mj0c\overlay\Lib\site-packages\setuptools_init
.py", line 16, in
import setuptools.version
File "C:\Users\philip\AppData\Local\Temp\pip-build-env-l3k0mj0c\overlay\Lib\site-packages\setuptools\version.py", line 1, in
import pkg_resources
File "C:\Users\philip\AppData\Local\Temp\pip-build-env-l3k0mj0c\overlay\Lib\site-packages\pkg_resources_init
.py", line 2172, in
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

ร— Getting requirements to build wheel did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

C:\Users\philip\Downloads\windows\windows>pause

Setup consistently fails

setup.bat consistently fails to build wheels for NumPy. Windows 11, python 3.10.6. Can't get the error message, the file closes when it fails to install. I think it said something to do with lapack atlas files missing.
I apologize if this is not helpful or formatted incorrectly/in the wrong place, I don't really have any idea what I'm doing here, just noticed a bug/ incompatibility that completely breaks crispy.

Unable to Identify and Create Segments with non-standard resolutions and Modified HUD positions

Steps to Reproduce:

Use a resolution different from 1920x1080 (16:9), for example, I'm using 1280x960 (4:3).

Expected Behavior:

Segments should still be created on different resolutions.

Observed Behavior:

The segments work fine on 1920x1080 resolution without any issues. However, when using a different resolution like 1280x960, the generated images in the "/sessions" folder are not positioned correctly, and the model is unable to identify game actions.

Environment:

Operating System: Windows 10 - 22H2
Python Version: 3.8

Attempts to Resolve:

I attempted to modify values in "/api/models/highlight.py" to correctly center the images, but the model still couldn't identify the segments. This could be due to the different aspect ratio between the resolutions.

Thank you.

Snapshot from one of my clips (HUD position showcase):
snapshot

Discord Server

Do you have like a discord server or similar?
I have a few questions and also some ideas for the ML part.

Rewrite the whole backend

After spending a few month re-learning python, some code in the backend does not satisfy me any more.

I'm planning on doing multiple modifications.

  • using a Database (I'm going for MongoDB and mongo-thingy as ODM) and use monty-db as backend for mongo-thingy.
  • use workers (I'm still not sure if we should, if we do we will probably use arq).
  • write tests with pytest.
  • drop pylint and use flake8.
  • make a clear separation between the routes and the backend.
  • change the architecture of the project

merged.mp4 not showing up

so after i extracted the zip, i ran the setup.bat and run.bat files as told in the instructions, but when i clicked on the results page after i selected my clips, it was just blank. When i checked my folder the merged.mp4 and merged.jpg files werent there either. Did i do something wrong during the installation?
image
image
image
first and second images show the cuts and results menu. Third image shows the exception.

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.