Giter VIP home page Giter VIP logo

beatmup's People

Contributors

lnstadrum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

beatmup's Issues

Code to train and GSLS conversion?

I'm very interested in the project. Is there a script to train a model on my own dataset and then convert the model to GLSL shader? I want to load the shader in Android.

Licensing

Hello,
I would be interested in using Beatmup for prototyping personal projects and maybe in the future in a commercial product, but the GPL license almost forbids commercial use.
Do you plan on changing the license of Beatmup? Like a BSD license (PyTorch, Caffe, Theano), an Apache license (TensorFlow) or maybe MIT/LGPL?

Thank you very much!

How to generate GLSL?

Hi,

Thanks for this nice project!
How did you achieve to create the code for X2 resampler ConvNet in GLSL?
Did you write it by hands or did you generate for your model?

Thank you!

Android code doesnt import in Android Studio

I was trying to import the Android project. But looks like it is an old project and there are issues with importing it. Can you make sure it can be imported with recent Android Studios and SDK changes?

cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{layoutlib}' is expected. ...
//and other errors:

* Exception is:
	Caused by: groovy.lang.MissingMethodException: No signature of method: build_2nizcq2ad1zthut2lgnlna1fc.android() is applicable for argument types: (build_2nizcq2ad1zthut2lgnlna1fc$_run_closure1) values: [build_2nizcq2ad1zthut2lgnlna1fc$_run_closure1@7163f77b]
	at build_2nizcq2ad1zthut2lgnlna1fc.run

windows installation

I'm having problems installing on windows 8.1 (AMD 8-4555,12GbRAM). The output is :-
C:\beatmup\build>cmake -DUSE_OPENGL=ON ..
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 6.3.9600.
CMake Error at pybind11/tools/FindPythonLibsNew.cmake:127 (message):
Python config failure: Python is 64-bit, chosen compiler is 32-bit
Call Stack (most recent call first):
pybind11/tools/pybind11Tools.cmake:16 (find_package)
pybind11/CMakeLists.txt:33 (include)

-- Configuring incomplete, errors occurred!
See also "C:/beatmup/build/CMakeFiles/CMakeOutput.log".

I've tried several Python installations from Python 3.6.3(64bit) up to Python 3.7.9-32/64 installs , setting path each time.
when I try 'cmake --system-information' the relevant output shows :-
C:\beatmup\build>cmake --system-information | more | grep "python"
PYTHON_EXECUTABLE:FILEPATH=C:/Program Files/csiro.au/workspace/Python36/python.exe
FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[C:/Program Files/csiro.au/workspace/Python36/python.exe][v3.6.5()]

I assume I am doing something stupid!(as usual).
rgrds
JonH

Not able to build X2 in ubuntu

Hi

I am trying to build x2 on my ubuntu os (Ubuntu 20.04.5 LTS).
Error when I am trying to make x2

Error :
/usr/bin/ld: lib_beatmup.a(pipeline.cpp.o): undefined reference to symbol 'XOpenDisplay' /usr/bin/ld: /lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[3]: *** [CMakeFiles/X2.dir/build.make:102: X2] Error 1 make[2]: *** [CMakeFiles/Makefile2:350: CMakeFiles/X2.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:357: CMakeFiles/X2.dir/rule] Error 2 make: *** [Makefile:273: X2] Error 2

Seems like an X11 issue.

I tried checking if X11 is installed using dpkg -l | grep x11
here are the results:
ii dbus-x11 1.12.16-2ubuntu2.3 amd64 simple interprocess messaging system (X11 deps) ii libqt5x11extras5:amd64 5.12.8-0ubuntu1 amd64 Qt 5 X11 extras ii libva-x11-2:amd64 2.7.0-2 amd64 Video Acceleration (VA) API for Linux -- X11 runtime ii libx11-6:amd64 2:1.7.2-11~ubuntu20.04 amd64 X11 client-side library ii libx11-data 2:1.7.2-11~ubuntu20.04 all X11 client-side library ii libx11-dev:amd64 2:1.7.2-11~ubuntu20.04 amd64 X11 client-side library (development headers) ii libx11-protocol-perl 0.56-7 all Perl module for the X Window System Protocol, version 11 ii libx11-xcb-dev:amd64 2:1.7.2-11~ubuntu20.04 amd64 Xlib/XCB interface library (development headers) ii libx11-xcb1:amd64 2:1.7.2-11~ubuntu20.04 amd64 Xlib/XCB interface library ii libxkbcommon-x11-0:amd64 0.10.0-1 amd64 library to create keymaps with the XKB X11 protocol ii x11-apps 7.7+8 amd64 X applications ii x11-common 1:7.7+19ubuntu14 all X Window System (X.Org) infrastructure ii x11-session-utils 7.7+4 amd64 X session utilities ii x11-utils 7.7+5 amd64 X11 utilities ii x11-xkb-utils 7.7+5 amd64 X11 XKB utilities ii x11-xserver-utils 7.7+8 amd64 X server utilities ii x11proto-core-dev 2021.5-3~ubuntu20.04 all transitional dummy package ii x11proto-dev 2021.5-3~ubuntu20.04 all X11 extension protocols and auxiliary headers

Is there anything I need to modify in the cmakefiles to let it find x11.

Please assist.

Pyhton example running failed

Hello! I am trying to run Python example (cifar100) and get the following error when model training started. The version of Tensorflow is 2.7, Python - 3.9

===== Training model...
2022-10-26 11:28:56.647155: W tensorflow/core/framework/cpu_allocator_impl.cc:82] Allocation of 614400000 exceeds 10% of free system memory.
Epoch 1/60
Traceback (most recent call last):
File "/home/evgenii/Documents/libs/beatmup/python/examples/cifar100.py", line 99, in
model.fit(train_images, train_labels, epochs=60, batch_size=256,
File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/evgenii/miniconda3/lib/python3.9/site-packages/tensorflow/python/eager/execute.py", line 58, in quick_execute
tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: filter_size does not have enough elements, requested 124416, got 10368
[[node gradient_tape/sequential/conv6/Conv2D/Conv2DBackpropFilter
(defined at /home/evgenii/miniconda3/lib/python3.9/site-packages/keras/optimizer_v2/optimizer_v2.py:464)
]] [Op:__inference_train_function_3183]

Errors may have originated from an input operation.
Input Source operations connected to node gradient_tape/sequential/conv6/Conv2D/Conv2DBackpropFilter:
In[0] sequential/shuffle_3/shuffle_3_shuffle (defined at /home/evgenii/miniconda3/lib/python3.9/site-packages/beatmup_keras.py:83)
In[1] gradient_tape/sequential/conv6/Conv2D/ShapeN:
In[2] gradient_tape/sequential/batch_normalization_5/FusedBatchNormGradV3:

Operation defined at: (most recent call last)

File "/home/evgenii/Documents/libs/beatmup/python/examples/cifar100.py", line 99, in
model.fit(train_images, train_labels, epochs=60, batch_size=256,

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 64, in error_handler
return fn(*args, **kwargs)

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/engine/training.py", line 1216, in fit
tmp_logs = self.train_function(iterator)

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/engine/training.py", line 878, in train_function
return step_function(self, iterator)

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/engine/training.py", line 867, in step_function
outputs = model.distribute_strategy.run(run_step, args=(data,))

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/engine/training.py", line 860, in run_step
outputs = model.train_step(data)

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/engine/training.py", line 816, in train_step
self.optimizer.minimize(loss, self.trainable_variables, tape=tape)

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/optimizer_v2/optimizer_v2.py", line 530, in minimize
grads_and_vars = self._compute_gradients(

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/optimizer_v2/optimizer_v2.py", line 583, in _compute_gradients
grads_and_vars = self._get_gradients(tape, loss, var_list, grad_loss)

File "/home/evgenii/miniconda3/lib/python3.9/site-packages/keras/optimizer_v2/optimizer_v2.py", line 464, in _get_gradients
grads = tape.gradient(loss, var_list, grad_loss)

Example Benchmarks

Hello,

first of all this project sounds very interesting, because it is the only framework (that I could find) that tries to enable neural network inferencing on OpenGL-ES2.0 devices, which includes a lot of low-power embedded Linux boards. I will take a look at the framework in the coming days or weeks when I have some time.

In the meantime, are there any benchmarks available as how the Open-GL-ES2.0 inference compares to a raw CPU inference with the same tensorflow model on any device? For me the interesting part would be to move some model parts to the GPU (even if it is a bit slower) in order to offload the CPU. But I have no idea how much slower a basic convolution model would be on GPU, is there any information available (no matter on what exact hardware or what exact model, just as a rough estimate)?

Segmentation fault when import tensorflow and beatmup

Hello! I have a problem of usage beatmup with tensorflow. When I import one of those libraries everything is ok. But import of both of these modules gives a fault.

This code gives the error "Segmentation fault (core dumped)"
import tensorflow
import beatmup

And this code gives "Floating point exception (core dumped)"
import beatmup
import tensorflow

fatal error: Python.h: No such file or directory

when trying to build beatmup (X2 was built successfully), i receive this error:

fatal error: Python.h: No such file or directory
i then installed libpython3-dev libpython3-all-dev, still the error

How to build X2 in macos

@lnstadrum Hi , I want to test shader-style neural network inference with backend of openGL in macos .
When I build this repo. I got following error

[build] Undefined symbols for architecture x86_64:
[build]   "___glewXChooseFBConfig", referenced from:
[build]       Beatmup::GraphicPipeline::Impl::Impl(Beatmup::GraphicPipeline&) in pipeline.cpp.o
[build]   "___glewXCreatePbuffer", referenced from:
[build]       Beatmup::GraphicPipeline::Impl::Impl(Beatmup::GraphicPipeline&) in pipeline.cpp.o
[build]   "___glewXDestroyPbuffer", referenced from:
[build]       Beatmup::GraphicPipeline::~GraphicPipeline() in pipeline.cpp.o
[build]   "___glewXGetVisualFromFBConfig", referenced from:
[build]       Beatmup::GraphicPipeline::Impl::Impl(Beatmup::GraphicPipeline&) in pipeline.cpp.o
[build]   "_glXChooseVisual", referenced from:
[build]       Beatmup::GraphicPipeline::Impl::Impl(Beatmup::GraphicPipeline&) in pipeline.cpp.o
[build]   "_glXCreateContext", referenced from:
[build]       Beatmup::GraphicPipeline::Impl::Impl(Beatmup::GraphicPipeline&) in pipeline.cpp.o
[build]   "_glXDestroyContext", referenced from:
[build]       Beatmup::GraphicPipeline::~GraphicPipeline() in pipeline.cpp.o
[build]       Beatmup::GraphicPipeline::Impl::Impl(Beatmup::GraphicPipeline&) in pipeline.cpp.o
[build]   "_glXMakeCurrent", referenced from:
[build]       Beatmup::GraphicPipeline::Impl::Impl(Beatmup::GraphicPipeline&) in pipeline.cpp.o

It seem like that cmake complier did not find glew libs. Although I put following command to cmakeLists.txt ,the error still there.

add_subdirectory(glew-cmake)
include_directories(glew-cmake/include)
link_directories(glew-cmake/build/lib)

Raspberry Pi 4 gpu failed to add service

I compiled beatmup successfully but when i ran it, it returned an error:
image

I tried Legacy GL and Fake KMS (Full KMS isnt avaiable on Twister OS)

My Specs:
Model: Raspberry Pi 4 Model B
RAM: 8GB
OS: Twister OS 32bit

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.