MagnumVD / RotoForge-AI

An implementation of SAM-HQ + some other stuff to make rotoscoping in blender fast af
Other
21 stars 1 forks source link

RotoForge AI

RotoForge is an implementation of SAM-HQ + some other custom stuff to make rotoscoping fast af

What can it do? (features):

Rotoforge generates bitmasks (grayscale images which show how much a pixel is part of a mask) based on prompts which the user provides. It can both generate masks for images and videos.

During this process you have multiple methods of fixing/adjusting incorrect masks.

Different mask prompts:

The AI is prompted via mask splines which you (the user) draws on the image. Currently it treats all splines as poly splines because I need to write my own conversion script, that will be fixed in the future.

You can change the prompt type per spline either manually by changing it's property or by using the 'Active Spline Settings' block in the menu where all settings are in one place.

Installation

Go into the preferences and install the addon. After that in the drop down menu under the addon, you can set an installation dir and then install the dependencies. This can take a little bit of time since it's ~8GB of data and will freeze blender.

Now, you can find RotoForge in your image editor in the masking tab.

Useful info here (tips and tricks):

Versions and compatibility

Hardware

This addon was originally created for Windows operating systems with Nvidia cards which support CUDA acceleration.

In order to learn about the required memory: The following tests were performed with an Nvidia GeForce RTX 2070 Max-Q, the dedicated Memory and GPU Memory of the machine were both tracked during the mask generation process.

Used Model Dedicated Memory GPU Memory Estimated model usage
None (idle) 0.8GB 0.6GB baseline
light 1.1GB 0.9GB 0.3GB
base 3.9GB 3.7GB 3.1GB
large 5.6GB 5.4GB 4.8GB
huge 7.0GB 6.8GB 6.2GB

There is an experimental branch for Metal gpus in the process, but nothing is guaranteed.

Although very unlikely, This experimental branch COULD POTENTIALLY HARM YOUR MACHINE, if you want to stay completely safe use a VM!

Blender versions

The addon was tested with the following blender versions:

Older versions or custom blender forks probably work, I just didn't test them.

License

RotoForge AI as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.