Skip to content
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

stub Movie interface timestamps #181

Merged
merged 4 commits into from
Oct 19, 2022
Merged

Conversation

h-mayorquin
Copy link
Collaborator

@h-mayorquin h-mayorquin commented Oct 18, 2022

While working in the current conversion with Murthy I am facing with some rather large video files and stubbing is very useful for fast iteration. However, the timestamps themselves are not stubbed and OpenCV goes frame by frame through the whole video rendering the stubbing process useless (even in external_mode=True). This PR implements stubbing in the timestamp extraction as well limiting the frame reading in OpenCV.

I added a test and tested this on the Murthy conversion.

@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Merging #181 (9000e43) into main (94c91ce) will increase coverage by 0.73%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   90.76%   91.50%   +0.73%     
==========================================
  Files          65       65              
  Lines        3423     3425       +2     
==========================================
+ Hits         3107     3134      +27     
+ Misses        316      291      -25     
Flag Coverage Δ
unittests 91.50% <100.00%> (+0.73%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...oconv/datainterfaces/behavior/movie/movie_utils.py 99.25% <100.00%> (+0.01%) ⬆️
...atainterfaces/behavior/movie/moviedatainterface.py 97.45% <100.00%> (ø)
src/neuroconv/tools/data_transfers.py 91.54% <0.00%> (+35.21%) ⬆️

@h-mayorquin h-mayorquin merged commit a948581 into main Oct 19, 2022
@h-mayorquin h-mayorquin deleted the movie_interface_timestamps branch October 19, 2022 16:11
@CodyCBakerPhD
Copy link
Member

I do wish there was a lazier way of getting the timestamps to begin with, but I guess that takes us out of the OpenCV territory so a bit bigger undertaking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants