Skip to content

[DONE] Use OCR to collect パワプロ2022 栄冠ナイン data and plot them onto a graph

Notifications You must be signed in to change notification settings

verhichi/pwpr-stat-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PWPR STAT GRAPH

日本語 README: README.md

What is this?

My personal project to collect game data from video stream and plot them in a graph.

  • Game: e-baseball Pawafuru PuroYakyuu (eBASEBALL パワフルプロ野球 2022)
    • a Japanese Baseball game
    • tailored for a specific game mode: Eikan-Nine(栄冠ナイン)
      • currently only supports Pitchers
        • only supports pitching speed, stamina, control
      • plots the increase/decrease in status of pitchers in course of the game
      • Currently can only properly read English names
      • Currently can only read first 5 pitchers
      • gameplay image(it's an all Japanese game) gameplay-screenshot

Screenshot

Graph that displays the development of certain statuses within the course of the game.

app-screenshot

The Entire Setup

The diagram below illustrates the entire setup needed to accumulate and plot the data.

entire-setup

Developers

Prerequisites

This is the environment I used.
You can use different hardwares/softwares but I can not guarantee that it will work. This simply describes my environment that I got to work.

  • Data Accumulator

    • Language:
      • Python 3.10.4
    • Software:
      • Tesseract 5.0.1
      • OBS 27.2.4 (For Rendering from Stream)
      • Must use OBS VirtualCam v2.0.5 to capture stream
    • Hardware:
  • API Server

    • Language:
      • Python 3.10.4
  • Frontend

    • node: v16.15.0 and above

Setup

Run the following Makefile command to install dependencies. This will install all backend and frontend dependencies.

$ make install

Accumulating Data

  1. Start the Game
  2. Open OBS and display game screen
    • Use OBS Virtual Camera
  3. Run the following command to start collecting data from stream
    $ make start-accumulator
  4. Play the game in Eikan-Nine(栄冠ナイン) mode
  5. Once done, stop accumulator(WIP: just ctrl + c for now)
  6. Data should be accumulated in output as {start_timestamp}.csv

Start Backend API Dev Server

Run the following command to start API Server in development mode.
Service will be available in http://localhost:5000.

$ make start-server

Start Frontend Dev server

Run the following command to start Frontend dev server.
Service will be available in http://localhost:3000.

$ make start-front

Build

TODO: May not setup build process as this app is made for local use and using dev server is good enough.