Motion Tracking Funscript Generator v0.5.x

Thanks but you can not set them all to same value? Feature request then for OFS.

Would it be possible to detect center the curves? What happens is if motion is taken over by the other actor or camera shifts a bit a motion from range 5 to 9 gets 1-5 even if the motion is the same. Can there be a button to level this out? Would help to eliminate alot of post processing.

I am working on a lua script to do this. My plan is to calculate the moving average and the absolute deviation from the moving average and use that to equalize the selected points.

2 Likes

That’s awesome thank you, should maybe even be hardcoded in the plugin.

The Ramer-Douglas-Peuker can I set the Epsilon to 45 somewhere? Its always 42 to 45 I set.

And postprocessing is now fullscreen thank you! The installer worked, unpacking (manual) not dunno why.

The Ramer-Douglas-Peuker can I set the Epsilon to 45 somewhere? Its always 42 to 45 I set.

New version v0.5.4 should remember the settings in the post processing menu

1 Like

That would be perfect. Other thing: Min/max choice, the frames are not always the right ones. Any chance for a frame choice by slider? At least for max? Min is OK 99% but max can be a camera move or movement of the tracking point. A wrong frame there distorts the curve heavily.

Hi! Is this lua released somewhere? I ve been looking a lot for this! Thanks!

2 Likes

Thank you very much! I ll apply it next time I script for sure

Whenever the MTFG window is not focused when it finishes, the window stops responding and I have to force close it. It doesn’t happen all the time though. Sometimes it happens when it’s focused too, but that’s rare. Anyone else experiencing this?

Check for the window in the background it is there somewhere.

Very useful tool, and written in Python no less, which i’m quite familiar with by now! I may end up contributing to this repo once i get some time to properly try out this tool.

Btw, given the recent rise in deep learning motion tracking algorithms/models which can better account for camera motion and different scene compositions, i wonder if the codebase would be modular enough to allow switching between them like add-ons. From first glance, the editor is already quite comprehensive, so as long as there’s a common interface between the model outputs and the controls you get, it should be quite doable.

Since I’ve been meaning to dabble with Python AI programming for a while now, this could be a neat excuse to experiment with machine learning while also contributing to a pretty useful tool!

5 Likes

is there a way to get this to run on the gpu? i have a 4080 and i suspect it would chew through frames like crazy.

1 Like

is there a way to get this to run on the gpu?

Unfortunately the tracker CSRT used does not have a cuda implementation as far as i can tell. So only the frame decoding is on gpu and the rest runs on the cpu.

I just found that it is sometimes the best choice to only use one tracker instead of two.

I followed the installation guide to use it on Ubuntu, but when I run nix run ... I get the following error and OFS won’t start:
error: unable to execute '/nix/store/3v7rhdhi2qfq3a02i8bkmpz33m4zsi7l-OpenFunscripter-4.0.1-nixgl-wrapper/bin/OpenFunscripter': Exec format error.
When I use sudo nix run ..., OFS starts but MTFG doesn’t.

Even for general users, the command nix run github:michael-mueller-git/Python-Funscript-Editor --refresh -- --generator displays a dialog box saying “Video file was not specified!”, so I think Python-Funscript-Editor is able to start.

I have selected the multi-user install for the nix package manager, but I get the same error with the single-user install. This is my first time using Nix. I don’t even know what’s going on. What should I do?

I adjusted the Code so that it is compatible with ubuntu now. (With commit 99e9874 I had unfortunately introduced an incompatibility to some linux. This should now be fixed) Can you please try again. If it is still not working for you, please give me the following details:

  • Exact Ubuntu Version
  • GPU

I have tested the adjusted code with a ubuntu 24.04 vm. Below my setup process:

  1. Create VM:
quickget ubuntu 24.04
echo "disk_size=\"60G\"" >> ubuntu-24.04.conf
quickemu --vm ubuntu-24.04.conf
  1. Use th gui installer and use default settings to install ubuntu.

  2. Install nix in ubuntu vm:

sudo apt update
sudo apt install curl
sh <(curl -L https://nixos.org/nix/install) --daemon
reboot # apply nix setup
  1. Enable flakes
mkdir ~/.config/nix
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
exit # close current shell
  1. Create MTFG dependencie cache
nix run github:michael-mueller-git/Python-Funscript-Editor --refresh -- --generator

When the command is executed on the pc for the first time it will take a vew minutes to compile the custom opencv dependencie. When the command success you will see the message box Video file was not specified.

  1. Compile and run OFS:
nix run github:michael-mueller-git/OFS --refresh --impure

It now works without any problems. Thank you for your quick response.

I run Vanilla os. Vanilla os supports the installation if nix packages via its own packagemanager “apx”. Would it be possible to provide such a package?