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

Implement bicubic interpolation #74

Open
monatis opened this issue Sep 20, 2023 · 4 comments
Open

Implement bicubic interpolation #74

monatis opened this issue Sep 20, 2023 · 4 comments

Comments

@monatis
Copy link
Owner

monatis commented Sep 20, 2023

Currently clip.cpp uses linear interpolation in image preprocessing. The original implementation uses the bicubic interpolation from Pillow. It needs refactoring from Pillow https://github.com/python-pillow/Pillow/blob/main/src/libImaging/Resample.c#L46-L62

@lithdew
Copy link

lithdew commented Jul 1, 2024

An implementation of bicubic interpolation is available inside llama.cpp.

https://github.com/ggerganov/llama.cpp/blob/master/examples/llava/clip.cpp#L1431

@monatis
Copy link
Owner Author

monatis commented Jul 1, 2024

Yes, I upstreamed clip.cpp to llama.cpp for LLaVA, and now there's some functionality that needs to be downstreamed from llama.cpp back to this repo. Currently I don't have enough time to maintain it, though. Maybe next month.

@lithdew
Copy link

lithdew commented Jul 1, 2024

I'm looking to use clip.cpp in a project soon - would you mind if I make a PR that brings some of the features in llama.cpp into clip.cpp?

@monatis
Copy link
Owner Author

monatis commented Jul 1, 2024

@lithdew That would be awesome. And feel free to ping me if you need to ask anything about the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants