Thomas Germer

Results 140 comments of Thomas Germer

I can not reproduce this in a clean environment: ```bash docker run --rm -ti python:3.10 bash pip install rembg pip install onnxruntime python3 -c "import rembg" # no error ```...

It is probably possible, but it won't be easy. Closed-form matting (`estimate_alpha_cf`) solves a large linear system with the iterative conjugate gradient descent method (CG for short). CG usually requires...

In the past, we tried to solve this with Numba's Ahead-of-Time compilation, but it caused various issues, so we removed it. * https://github.com/pymatting/pymatting/issues/43 * https://github.com/pymatting/pymatting/issues/45 * https://github.com/pymatting/pymatting/issues/38 * https://github.com/pymatting/pymatting/issues/37 *...

> What if cancelling numba‘s binarize optimization at all? What do you mean by that? > I would certainly expect numba to output a intel-optimized ubuntu.iso to match such effort....

If you are using Docker, you also have the option of using checkpoints. But I have just tested them and they are slower (1.2 seconds vs 1 second for a...

> Do you have any idea why ? Sorry, no idea, but I guess your issue is probably related to Numba. They have a very active discourse group. Maybe someone...

> It might be a bit slower than the original, but all tests passed. ~~rembg only uses PyMatting for foreground estimation, which is relatively fast.~~ **EDIT:** Apparently, rembg uses both...

> rembg only uses PyMatting for foreground estimation Oh, I was mistaken. Apparently, rembg also uses `estimate_alpha_cf`. https://github.com/danielgatis/rembg/blob/1101c1521c3c7f04b9fa68a4f0d61b338f5ee9e7/rembg/bg.py#L80

CLIP has [many models](https://github.com/openai/CLIP/blob/dcba3cb2e2827b402d2701e7e1c7d9fed8a20ef1/clip/clip.py#L30) with different sizes. See also [here](https://huggingface.co/models?search=openai%2Fclip) for HuggingFace CLIP models. That aside, if you finetune a vision encoder like ResNet50 without also finetuning the text encoder...

You are correct! Thank you for finding this issue! I think the best solution would be to raise a `ValueError` with a meaningful error message when `self.shuffled_data_points.shape[0]` is less than...