Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do i use custom models? #76

Open
isntfunny opened this issue Nov 23, 2023 · 7 comments
Open

How do i use custom models? #76

isntfunny opened this issue Nov 23, 2023 · 7 comments
Labels
question Further information is requested

Comments

@isntfunny
Copy link

Is it possible to use custom models, for example from here?

And if so, can they be hosted locally instead of being loaded from an url when using the node version?

@DanielHauschildt
Copy link
Contributor

No.

@isntfunny
Copy link
Author

In this line there is a reference to a large model. Is it somehow possible to use that to get better results?

https://github.com/imgly/background-removal-js/blob/main/packages/node/src/schema.ts#L43

@DanielHauschildt
Copy link
Contributor

The large model is using float32 compared to float16. The quality is almost the same.

@DanielHauschildt DanielHauschildt added the question Further information is requested label Dec 24, 2023
@DanielHauschildt
Copy link
Contributor

FYI: I added a new mode with 1.3.0 that outputs the original image resolution

@dylie-eth
Copy link

Is there any way (could be hacky) that we can use custom models?

I understand that you said there was no way to do it currently, but I likely need a stronger model to accurately remove backgrounds as neither of the current ones are good enough for my use case.

@Piliuta
Copy link

Piliuta commented Mar 27, 2024

Joining the original question. Whereas the library works great on complex images, it often fails on images with simple objects. Having the ability to switch models would be an amazing feature of this library.

@DanielHauschildt could you elaborate on why the answer is no? Is this because it is hard to integrate or there are no human resources to do it or something else?

@DanielHauschildt
Copy link
Contributor

Its just a resource thing.

If you have a proposal for models that work better, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
4 participants