lucazanella / AnomalyCLIP

40 stars 7 forks source link

About using CLIP to extract video features #12

Open ssp789 opened 3 months ago

ssp789 commented 3 months ago

May I ask how you specifically use CLIP to extract video features? Has specific code been provided? Thank you very much for your reply!

lucazanella commented 3 months ago

Hi,

We used the ViT-B/16 model from CLIP to extract the features. While we haven't included the code snippet for this, you can save the features after line L121. For a code example without the hydra template, refer to this issue #8 where the author was able to get the same features as those uploaded to Google Drive. Importantly, make sure you first convert all videos to frames using OpenCV.

If you have any further questions, feel free to ask!

ssp789 commented 3 months ago

Hi,

We used the ViT-B/16 model from CLIP to extract the features. While we haven't included the code snippet for this, you can save the features after line L121. For a code example without the hydra template, refer to this issue #8 where the author was able to get the same features as those uploaded to Google Drive. Importantly, make sure you first convert all videos to frames using OpenCV.

If you have any further questions, feel free to ask!

Thank you very much. This will be very helpful for my future practice.