Code Monkey home page Code Monkey logo

paulknewton / minecraft-stat-checker Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.13 MB

Tools to extract Minecraft player names from screenshots and retrieve player statistics. Used to assess the level of your opponents before entering the game. Uses optical character recognition via Google Tesseract to extract usernames from images. Statistics retrieved from online Minecraft servers. Data is summarised using pandas dataframes and Seaborn heatmaps.

Python 98.71% Shell 1.29%
minecraft statistics tesseract-ocr optical-character-recognition

minecraft-stat-checker's Introduction

Build Status codecov pyup python3

DeepSource

Minecraft Stat Checker

Tools to extract Minecraft player names from screenshots and retrieve player statistics. Used to assess the level of your opponents before entering the game. Uses optical character recognition via Google Tesseract to extract usernames from images. Statistics retrieved from online Minecraft servers. Data is summarised using pandas dataframes and Seaborn heatmaps.

What is it...?

Minecraft has a lot of statistics: wins, games, kills, deaths...

These statistics make a difference and help players understand who they are playing against. They can even be used to understand IF you want to play against someone. This tool allows you to get a summary of statistics for the players in a round by using a screenshot from a Minecraft game.

Let's walk through the scenario:

  1. Get ready to join a Minecraft round

    Minecraft displays the players that are entering a round. This is shown at the top of the screen as list if players/teams:

    Screenshot

  2. Launch the tool

    The tool is launched (usually via a shortcut key). It prompts the user to take a screenshot of the area listing the usernames.

  3. Build the stats

    The tool extracts usernames from the image using OCR (via Google Tesseract) and looks up statistics of each user (via online web services). These are displayed as a pop-up window:

    Statistics

  4. Make the decision. Play or pass?

    Based on the statistics of the assembled players you can decide if it makes sense to jump into the round...or move on to fight another day.

Installing

Clone the repo and install required packages via pip:

pip install -r requirements.txt

The unit tests are written in pytest so install this as well:

pip install -r requirements_dev.txt

Using the tool

The main program is mcstats:

python mcstats.py

It supports different command line parameters:

python mcstats.py -h

usage: mcstats.py [-h] [--url URL] [--image IMAGE] [--filter FILTER]

check_stats

optional arguments:
  -h, --help       show this help message and exit
  --url URL        URL to retrieve statistics (will append user)
  --image IMAGE    screenshot of minecraft players
  --filter FILTER  preprocessing method that is applied to the raw image
                   during OCR

By default, the tool takes the input from the clipboard, unless given a file via the --image parameter. A default statistics service will retrieve figures for each user, but can be overridden by the --urlparameter. Different filtering algorithms can be used to tune the OCR character recognition (thresh or blur). Default: blur.

minecraft-stat-checker's People

Contributors

paulknewton avatar

Stargazers

 avatar

Watchers

 avatar

minecraft-stat-checker's Issues

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.