8000 GitHub - skpeter/SmartCV-SSBU: A Smash Ultimate computer vision project that reads live game data in a low resource costing way
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

skpeter/SmartCV-SSBU

Repository files navigation

SmartCV-SSBU

demo.mp4

SmartCV-SSBU is a tool designed to provide data on Super Smash Bros. Ultimate matches without the need for installing mods on your Nintendo Switch, or the need for a powerful PC to read game data in real time.

It's a project that uses pixel detection to recognize certain situations in the game to take the opportunity to read data from using OCR. Due to this, it's able to gather enough data to report the results on a match (some assumptions given). Look for the How does it work? section to get a more in-depth explanation.

Requirements

Installation

Step 1.1: Installing the CPU version

  • Installing the CPU version is very easy. Just download the compiled release.zip here.
  • You can skip to step 2 from here.

Step 1.2: Installing the GPU version

  • You will need to download the source code zip < 8909 a href="https://github.com/skpeter/smartcv/releases">here.
  • Install Python if you haven't done so already here. Recommended version is 3.12.
  • Open a command prompt terminal on the installed directory and type pip install -r requirements.txt
  • You will need to then install PyTorch, which is done through command prompt/terminal. Go to Pytorch's "Start Locally" section here, pick the Stable build, select the OS you use (Windows, Mac or Linux), Pip as packaging system, Python as language and then select the Compute Platform available on your GPU. You can check which version of CUDA your GPU supports here. PyTorch installation page
    • Choosing these options will generate a command that you should copy and paste on your terminal/command prompt. PyTorch weighs around 3GB, so take your time.

Step 2: Setup

SmartCV will read from a separate feed from OBS that will be provided to it. This is where Advanced Scene Switcher comes in. Once you have it installed, open it on the Tools tab: Advanced Scene Switcher Setup

  • On the window that opens, go to the Macros tab and click on the plus sign to add a new macro (you can name it anything you want). Click on the other plus signs to add a condition and an action to this macro. I've attached a screenshot so you can mimic the settings:

Advanced Scene Switcher Setup

    • "SSBU" should be the OBS source for your capture card.
    • You can set the path to save the screenshot anywhere you'd like (SmartCV must have access to it), but it is highly recommended that you save the screenshot as a WEBP. This image format causes the least amount of issues and is very lightweight, however if for some reason you can't use WEBPs, you can save it as a JPG instead.
  • Go to SmartCV's config.ini file and set the feed_path setting to the path where OBS is saving the screenshots.

Step 3: Usage

  • To open the GPU version of the app, open the main.py file with Python. Otherwise to run the CPU version just run smartcv.exe. From here all you need to do is follow the on-screen instructions for the game detection to start. Make sure to keep OBS open and do not disable the game capture source!

Troubleshooting

  • When I run the app it says a bunch of code that ends with ModuleNotFoundError: No module named 'torch'" at the end! What do I do?

Try restarting your system. If that doesn't work, append py -m to the code that installs PyTorch. For example: py -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Where do I use this?

SmartCV opens a websocket server (on port 6565 by default) to send data to. As of this writing, only S.M.A.R.T. has integrations to it. If you want to integrate SmartCV into your own app, you can look at what the data output looks like on the example JSON files.

Known Issues

  • The app doesn't know how to differentiate handwarmers from actual matches. S.M.A.R.T. (the companion app) has a workaround for this at the moment.

How does it work?

Explanation coming soon

Check out also:

Contact

I am mostly available on my team's Discord Server if you'd like to talk about SmartCV or have any additional questions.

About

A Smash Ultimate computer vision project that reads live game data in a low resource costing way

Resources

License

Stars

Watchers

Forks

0