Preprocess for torch.Tensor instead of PIL Image? #1117
-
|
Howdy! open_clip is awesome! I'm just getting started experimenting with all these awesome models. I'm using cosine similarity in CLIP space as a loss for a project I'm working on. One of the things I'm noticing is that the Maybe I've missed it, but are there any utilities available in this repository for getting Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
(In the meantime, I just vibe-coded up this converter function, but it's a lot of duplicate work just to sidestep those initial Image to Tensor conversions...) |
Beta Was this translation helpful? Give feedback.
-
|
@AnsonSavage most of the transforms are already fine with torch.Tensor, it was just the forced calls to ToTensor and img.conver('RGB'), I think #1122 should fix that? |
Beta Was this translation helpful? Give feedback.
@AnsonSavage most of the transforms are already fine with torch.Tensor, it was just the forced calls to ToTensor and img.conver('RGB'), I think #1122 should fix that?