{"id":15020683,"url":"https://github.com/lnstadrum/beatmup","last_synced_at":"2025-10-26T01:32:18.544Z","repository":{"id":40455490,"uuid":"264727017","full_name":"lnstadrum/beatmup","owner":"lnstadrum","description":"Beatmup: image and signal processing library ","archived":false,"fork":false,"pushed_at":"2023-11-21T13:54:39.000Z","size":12359,"stargazers_count":205,"open_issues_count":0,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-26T01:32:00.564Z","etag":null,"topics":["android","gpu","gpu-computing","image-processing","linux","opengl","opengl-es","raspberry-pi","signal-processing","windows"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lnstadrum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-17T18:05:31.000Z","updated_at":"2025-08-26T04:53:48.000Z","dependencies_parsed_at":"2024-12-16T12:27:43.840Z","dependency_job_id":"6a6c3d06-239c-4d83-b773-4b216b71ee5a","html_url":"https://github.com/lnstadrum/beatmup","commit_stats":{"total_commits":38,"total_committers":1,"mean_commits":38.0,"dds":0.0,"last_synced_commit":"64ab08c5405061d983b00e48ff2ad23863aea5fe"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lnstadrum/beatmup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnstadrum%2Fbeatmup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnstadrum%2Fbeatmup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnstadrum%2Fbeatmup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnstadrum%2Fbeatmup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnstadrum","download_url":"https://codeload.github.com/lnstadrum/beatmup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnstadrum%2Fbeatmup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281047793,"owners_count":26435124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","gpu","gpu-computing","image-processing","linux","opengl","opengl-es","raspberry-pi","signal-processing","windows"],"created_at":"2024-09-24T19:55:25.926Z","updated_at":"2025-10-26T01:32:18.511Z","avatar_url":"https://github.com/lnstadrum.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![android](https://github.com/lnstadrum/beatmup/workflows/android/badge.svg) ![linux](https://github.com/lnstadrum/beatmup/workflows/linux/badge.svg) ![windows](https://github.com/lnstadrum/beatmup/workflows/windows/badge.svg) ![Python packages](https://github.com/lnstadrum/beatmup/workflows/Build%20Python%20packages/badge.svg)\n\n\n# Overview\n\nBeatmup is an extensible asynchronous image and signal processing framework.\n\n### Beatmup is for image processing, mainly.\n  - It enables low-level user-defined processing tasks execution\n    - in parallel and using hardware acceleration for the maximum speed,\n    - asynchronously, in an application-friendly fashion.\n\n  - It implements basic building blocks and predefined processing operations:\n    - Image resampling and geometric operations\n    - Basic color filtering\n    - Flood fill and contour extraction\n    - Realtime rendering\n\n### Beatmup runs quite everywhere.\n  - Used in **linux**, **Windows** and **Android**\n  - Written in **C++11**, it has **Java** and **Python** bindings\n  - **Prebuilt Python packages** are available for x64 desktop Windows and Ubuntu-based linux distributions\n  - Few to no dependencies: Beatmup is extremely easy to build for a different platform\n    - git, CMake and a C++ compiler is all you need\n    - Beatmup compiles with gcc, clang and msvc\n\n### Beatmup speeds up processing by using GPU regardless its vendor, price and release year.\n  - It runs on\n    - desktop GPUs from mainstream vendors,\n    - integrated desktop GPUs,\n    - Android GPUs,\n    - Raspberry Pi GPU (all models including Pi Zero W),\n    - NVIDIA Jetson Nano,\n    - ...\n  - It uses the GPU for\n    - *x2*, neural network-based image upscaling technique,\n    - running inference of small user-defined neural nets,\n    - applying user-defined GLSL shaders to process images,\n    - realtime camera image processing in Android,\n    - scene rendering and predefined image processing tasks.\n\n\n# Highlights\n\n## *x2*: a neural net-based image upscaler\n\nBeatmup is arguably the easiest way to get a fast hardware-accelerated neural network-based image superresolution running on any decent GPU. It does not provide a state-of-the-art PSNR score, but can run at a hundred of images per second on a desktop machine.\n\nMore details on the neural network design and the inference implementation: [Inferring a super-resolution neural network on Raspberry Pi GPU](https://medium.com/analytics-vidhya/inferring-a-super-resolution-neural-network-on-raspberry-pi-gpu-89b5456d21ef)\n\nUpdate in 2.1 release: the fine-tuned version of the model (trained with multiple degradation kernels) achieves now 32.64 dB on DIV2K validation set compared to the initial score of 32.57 dB.\n\n\n# Available resources\n\n## Docs\n * C++ documentation is available [here](https://lnstadrum.github.io/beatmup/cpp/html). This is the most extensive documentation, it also contains additional explanations that do not relate to a specific programming language:\n   - [Programming model](https://lnstadrum.github.io/beatmup/cpp/html/ProgrammingModel.html)\n   - [NNets module overview](https://lnstadrum.github.io/beatmup/cpp/html/NNetsModuleOverview.html)\n * Java package API documentation is [here](https://lnstadrum.github.io/beatmup/java/html).\n * Python documentation is [here](https://lnstadrum.github.io/beatmup/python/python.html).\n\n## C++\nThere is a number of test apps showcasing the use of Beatmup with additional explanations in [apps](apps) folder. The code is in C++, but can be universally helpful. Few examples:\n * [apps/shaderer](apps/shaderer/app.cpp) processes images with a custom GLSL fragment shader read from the standard input.\n * [apps/x2](apps/x2/app.cpp) is a test app for the *x2* neural net.\n * [apps/classify](apps/classify/app.cpp) is a dog image classifier, a variant of ResNeXt trained on a subset of ImageNet containing 120 classes of dogs and cats images. The inference is implemented with OpenGL shaders. Top-1 validation accuracy achieved on Raspberry Pi Zero W is 72.08%. Classifying a 385*385 image takes ~595 ms there.\n\n## Python\n[python/examples](python/examples) folder contains detailed examples of scripts using Beatmup in Python.\n * [cifar100.py](python/examples/cifar100.py) explains how to train a neural net with TensorFlow/Keras, convert it into a Beatmup-compliant model and run its inference on CIFAR100 test set.\n * [x2_superresolution.py](python/examples/x2_superresolution.py) and [x2_superresolution_video.py](python/examples/x2_superresolution_video.py) showcase applying x2 upsampling neural net to an image and a video.\n\nUnit tests in Python are available in [python/tests/test.py](python/tests/test.py) and [python/tests/test_nnets.py](python/tests/test_nnets.py).\n\n## Java (Android)\nAn Android test app is available in [android/app](android/app) folder. It consists of independent examples showing how to use Beatmup in Android.\n * [BasicCameraUse.java](android/app/src/main/java/xyz/beatmup/androidapp/samples/BasicCameraUse.java) shows how to get the camera preview, apply a simple shader and display the result.\n * [UpsamplingConvnetOnCamera.java](android/app/src/main/java/xyz/beatmup/androidapp/samples/UpsamplingConvnetOnCamera.java) implements the application of x2 upsampling neural net to the camera preview.\n * [DogClassifier.java](android/app/src/main/java/xyz/beatmup/androidapp/samples/DogClassifier.java) implements the dog classifier taking the camera preview image as input.\n\n\n\n# Quick start: compiling Beatmup\n\nTo get things running, make sure you have *git* and *CMake* installed, then pick one of the following copy-paste recipes.\n\n## Linux\n\nBuilding **X2** app upscaling an image using a neural net inferred with OpenGL:\n\n    git clone https://github.com/lnstadrum/beatmup.git\n    cd beatmup\n    git submodule update --init --recursive\n    mkdir -p build \u0026\u0026 cd build\n    cmake -DUSE_GLX=ON ..\n    make X2\n\n * Try to use `-DUSE_OPENGL=ON` instead `-DUSE_GLX=ON` starting from a clean build folder if you run into trouble.\n * On **Raspberry Pi prior to series 4** use the EGL backend with following CMake command:\n\n    `cmake -DUSE_EGL=ON -DUSE_BRCM_LIBS=ON -DGLES_VERSION=20 ..`\n\nMore details on Raspberry Pi setup [here](https://github.com/lnstadrum/beatmup/wiki/Compiling-Beatmup-on-Raspberry-Pi-prior-to-4).\n\n * On **Raspberry Pi 4** rather use the following CMake command:\n\n    `cmake -DUSE_EGL_DRM=ON -DGLES_VERSION=20 ..`\n\nMore details on Raspberry Pi 4 setup [here](https://github.com/lnstadrum/beatmup/wiki/Compiling-Beatmup-on-Raspberry-Pi-4).\n\nOnce the app is built, you can feed it with an image of your choice and get the upscaled result as follows:\n\n    ./X2 \u003cyour-image\u003e.bmp x2-result.bmp\n\n## Windows\n\nTo build the **X2** app in Windows you may install *Visual Studio* and generate the VS solution as follows:\n\n    git clone https://github.com/lnstadrum/beatmup.git\n    cd beatmup\n    git submodule update --init --recursive\n    mkdir build \u0026\u0026 cd build\n    cmake -DUSE_OPENGL=ON ..\n\nThen open the *.sln* solution file in Visual Studio and build the executable.\n\n## Android\n\nThere is Android project containing a library and a test app modules (*lib* and *app*). To build them install Android Studio and Android NDK bundle, clone the repository and open the project situated in *android* folder in Android studio.\n\nYou can build an apk in a docker container as well. Having docker installed, you can run the following script to build *beatmupApp.apk* installation package which you may then copy to your Android phone and open it there to install the test app:\n\n    git clone https://github.com/lnstadrum/beatmup.git\n    cd beatmup\n    git submodule update --init --recursive\n    docker build -f dockerfiles/android.Dockerfile -t beatmup-android .\n    docker run -v $(pwd):/opt/android-build beatmup-android\n\n\n# Quicker start with Python\n\n## Windows\n\nPrebuilt python packages are available in 64-bit Windows for Python versions from **3.6** to **3.11**:\n\n    python -m pip install --upgrade pip\n    python -m pip install beatmup\n\n## Ubuntu-based linux\n\nPrebuilt packages for x64 desktop Ubuntu-based linux distributions are available for downloading on the [releases page](https://github.com/lnstadrum/beatmup/releases/).\n\n## Compiling Python package\n\nIf there is no prebuilt package available for your platform/OS, you can easily build a Python wheel installable with `pip` on your own.\n\nFirst, get the code and try to compile an app as explained above. Then in the repository root folder run\n\n    cd build\n    make beatmup\n    cd ../python\n    python3 setup.py bdist_wheel clean\n\nThe installation package is now available in `python/dist` folder. You can install it and make sure it works:\n\n    python3 -m pip install --no-index --find-links=dist beatmup\n    python3 -c \"import beatmup; beatmup.say_hi()\"\n\n\n# Licence and contributions\n\nThe project is licensed under the GNU GPL v3 licence.\n\nThe contributions are governed by the [Contribution Licence Agreement (CLA)](CLA.md). In short, under this Agreement you remain the copyright owner of your contribution, but you allow us to use and distribute your contribution under the terms of a possibly different licence.\n\nIf you want to contribute:\n * make sure you own the copyright of your contribution,\n * raise a pull request,\n * send a signed CLA on beatmup.imaging@gmail.com.\n\nOtherwise:\n * raise an issue if you have a question or a feature request,\n * contact us by email.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnstadrum%2Fbeatmup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnstadrum%2Fbeatmup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnstadrum%2Fbeatmup/lists"}