-
Notifications
You must be signed in to change notification settings - Fork 234
feat(v2): add video support #972
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
a452268
feat: add video url and tensors to proto
3ccb697
feat: add video url and video ndarray
dc957d1
feat: add video torch tensor and tests
fc86920
fix: mypy checks
8a55e0b
chore: add av to video extra
5cb098a
fix: allow dim 3
3ba1f78
test: wip video load and save
be63926
refactor: move to numpy to computational backend
395a495
fix: video load and save
406ec80
test: adjust tests
091e79a
fix: video load and save and add docstrings
dee1146
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-add-v…
e4106a8
fix: fix some imports after merging
23ee930
docs: add doc strings and fix example urls
7ab8dbd
docs: small fixes in docs
ecf01d8
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-add-v…
5295dd1
refactor: rename save to mp4 file to save
b3f2ccb
feat: add shape method to comp backend
20ecf2c
refactor: move validate shape to video tensor mixin
711d105
refactor: extract private load and make separate methods for frames
0c9c1fd
fix: use torch shape instead of size method
e3a465c
fix: add typehint to shape in comp backend
40eac93
docs: add supported strings for skip type
a700f30
fix: apply suggestions from code review
94572fd
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-add-v…
07ceae8
fix: small change to trigger ci again
c2e129d
fix: extract shape var
d50ae67
fix: introduce compbackendinterface
2e365e6
fix: revert previous pr and fix for mypy
c44a035
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-add-v…
95b0b81
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-add-v…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: introduce compbackendinterface
Signed-off-by: anna-charlotte <[email protected]>
- Loading branch information
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe briefly explain why we went for a static method here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
.validate()ofVideoNdArraywe want to call the validation for generalVideoNdArray(by callingsuper().validate()), and secondly we want to add a video specific shape check (and respectively for torch). As far as I know it's not possible to specify insuper()which parent class to go to, instead it just goes to through all the parent classes and stops when it find a corresponding method. Therefore we have to call the second check explicitly. When calling it as asVideoTensorMixin.validate()the information of the child class gets lost though, which we need to get the corresponding comp backend. Therefore the changes in the signature and to staticmethod.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you wan to use a specific superclass implementation, instead of using
super()you can do something like:Or if you need to pass the subclass
cls:This unbinds
foofrom the class, so you can give it anyclsargument that you want.You can see this in the
__class_getitem__implementation ofNdArray.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nice, thanks! This works, but mypy complains:
Do u know what to do here to satisfy mypy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok just saw that in
__class_getitem__ofNdArrayit is being ignored (# type: ignore), will add that here too then