Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FerrumPix Models

This repository is a place to keep files. It contains no original work of its own, only model files from other projects, converted to ONNX so that FerrumPix can run them without Python.

Licences

There is no single licence covering this repository. Every file carries the licence of the project it came from:

File Origin Licence Notices
mobilesam-encoder-v1.onnx MobileSAM Apache-2.0 licenses/LICENSE.Apache-2.0.txt, licenses/NOTICE-mobilesam.txt
mobilesam-decoder-v1.onnx MobileSAM Apache-2.0 the same two
midas-small-v1.onnx MiDaS MIT licenses/LICENSE.MIT.midas.txt, licenses/NOTICE-midas.txt
lama-v2.onnx LaMa Apache-2.0 licenses/LICENSE.Apache-2.0.txt, licenses/NOTICE-lama.txt

MobileSAM builds on Segment Anything by Meta Platforms and on TinyViT by Microsoft. Both copyright notices are reproduced in the notice file.

LaMa's weights are the "big-lama" checkpoint the upstream README names as its own download. The notice file records the full chain: original project, weights, and the ONNX export this copy came from.

Both licences permit redistribution. Whoever passes one of these files on has to pass on its licence text and its copyright notices with it. That is why the licenses folder belongs to every release, not just to the source tree.

What was changed

The weights were exported to ONNX unchanged, without retraining and without altering anything about the weights themselves. Each notice file records how its file was produced, and where.

lama-v2.onnx is a half-precision export: only the convolution weights are stored as float16, with a cast in front of each. Input and output stay float32 and the arithmetic is done in float32, so nothing has to be converted by the caller.

Apache-2.0 requires changes to be stated. Converting the file format is one, so it is stated here and in the notice files.

Checksums

SHA256SUMS.txt accompanies every release. FerrumPix carries the same checksums inside the application and verifies every file it fetches against them. A checksum that travelled with the file would be supplied by the same attacker who supplied the file.

Installing by hand

The usual way is the button in the FerrumPix settings, under Technology. Anyone who would rather place the files themselves - on a machine without a network connection, for instance - puts them here:

System Folder
Linux ~/.config/FerrumPix/Modelle
Windows %APPDATA%\FerrumPix\Modelle
macOS ~/Library/Application Support/FerrumPix/Modelle

A Modelle folder next to the application and /usr/share/ferrumpix/modelle are searched as well. Whatever sits in the user's own folder wins.

The file names have to stay as they are - FerrumPix looks for them by name and checks their checksum.

What is needed for what

Feature Files Together
Select an object by clicking it (mask tool) mobilesam-encoder-v1.onnx, mobilesam-decoder-v1.onnx 42 MiB
Depth mask and depth blur midas-small-v1.onnx 63 MiB
Remove an object lama-v2.onnx 105 MiB

They are independent of one another: if you only want the object selection, fetch only its two files. When a piece is missing, the matching controls in FerrumPix are not there - not greyed out, gone.

Everything runs on your own machine. Nothing is transmitted to anyone, and FerrumPix never fetches anything by itself.

Versions

The version is part of the file name. A new model gets a new name; the old file stays valid and FerrumPix keeps working with it until someone asks for the update.

That holds as long as the contract stays the same - the inputs, their shapes and their value ranges. It did not for LaMa: lama-v1.onnx had two separate inputs, a fixed size of 512 by 512 and output in 0..255, while lama-v2.onnx has one four-channel input, free sizes and output in 0..1. Falling back to the old file would not give an older result, it would give nonsense, so the old file was removed rather than kept.

About

Model files for the object selection and depth features of FerrumPix

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors