Add R(2+1)D, S3D, and MViT V2 as feature extractors#306
Merged
Conversation
Co-authored-by: ekosman <10260165+ekosman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add more feature extractors using up-to-date models
Add R(2+1)D, S3D, and MViT V2 as feature extractors
Feb 21, 2026
ekosman
approved these changes
Feb 21, 2026
ekosman
approved these changes
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The codebase only supported older video feature extractors (C3D, MFNET, 3D-ResNet). This adds three modern, torchvision-backed alternatives with Kinetics-400 pretrained weights — no separate weight downloads required.
New extractors
r2plus1ds3dmvitChanges
network/r2plus1d.py,network/s3d.py,network/mvit.py— thin wrapper classes that strip the classification head and expose the backbone as a feature extractorutils/load_model.py— adds loading logic for the three new models;feature_extractor_pathis nowstr | None— omitting it triggers torchvision's auto-download of pretrained weights (onlyc3d,mfnet,r3d101,r3d152still require an explicit path)utils/utils.py— adds correct normalization and resize/crop transforms per modelutils/types.py— extendsFeatureExtractorunionfeature_extractor.py,AD_live_prediction.py— new choices exposed in CLI argsUsage
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.