Experimental Image-based Load Remover for LibreSplit on Linux
This repository has been archived on 2026-02-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
2026-02-19 21:58:54 +01:00
profiles Add profile for Fallout 4 2026-02-19 21:49:40 +01:00
.gitignore Initial commit with existing project files 2026-02-14 20:45:02 +01:00
ilr.py You can now define multiple reference images and masks 2026-02-19 21:47:48 +01:00
LICENSE Add License 2026-02-14 20:55:11 +01:00
README.md Fix profile example in Readme 2026-02-19 21:58:54 +01:00
requirements.txt Initial commit with existing project files 2026-02-14 20:45:02 +01:00

Image based Load Remover for LibreSplit

This is an experimental image-based Load Remover compatible with LibreSplit.

Notes

  • This works only in games where a distinct region, e.g. a text is present at exactly the same position during the loading screen
  • Wayland is not supported (see this issue in python-mss)!

Compatibility

System Requirements

  • Tested on Ubuntu 24.04
  • Python 3.12
  • X11

You also need the pip packages in requirements.txt!

Games

You may have to write your own profile. Or tweak existing ones when you have another screen resolution or ingame settings.

List of predefined profiles:

* inaccurate or error-prone

Create a profile

Take a look at this example profile:

# Path to the reference images, relative to the profile file:
references:
  - image: ./loading.png
    # You can also specify a mask to ignore areas of
    # the reference image & screenshots (this is optional):
    mask: ./loading-mask.png
# starts with 1
monitor: 1
# The region containing something that is always
# there in the loading screen - this should be
# as distinct as possible to mitigate false-positives
region:
  left: 98
  top: 975
  width: 118
  height: 25
# How to calculate the difference of the
# current frame against the reference
difference:
  # The only existing method currently is
  # nrmse (Normalized Root Mean Square Error)
  method: nrmse
  # If the difference < this threshold, the current
  # frame is considered a loading screen
  threshold: 0.02
# How many detection to perform per second (ideally)
# optional, default: 30
target_dps: 30
# Pre-defined filters might help to improve detection accuracy
filters:
  # Converts the screenshots from RGB to greyscale
  # by calculating the mean value of r, g and b
  - mean_greyscale

You can dump cropped screenshots in 1-second intervals using the dump-images command, and use one of those as the reference image.
Run the dump-difference command to debug the difference to the reference image, for every frame.