You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a subtask to #206 , Id like to see addition of time unit conversion code in this package. A few things to consider implementation-wise;
currently we use three units; frame, milliseconds, and seconds.
there could be some alternative spellings of the units in use (some examples;
frames: frame
seconds: second, sec, s
milliseconds: millisecond, msec, ms
for conversion from/to frames, code needs to know fps of the video, and there could be two possible sources of the information under the current specification
in the Annotation annotation this should be obtainable via something like this
ann_v=mmif.get_views_for_document('vd1')
ann_ann=ann_v.get_annotation(AnnotationTypes.Annotation)
fps=ann_ann.properties['framerate']
# again, there may be alternative keys ('frame-rate', 'frames-per-second', 'fps', ...)
note that the second method requires some video processing software under the hood (opencv, ffmpeg, etc), but I don't like to ship mmif-python package with a full opencv dependency. Hence we might need to consider implementing this part as a plugin package.
New Feature Summary
As a subtask to #206 , Id like to see addition of time unit conversion code in this package. A few things to consider implementation-wise;
frame
,milliseconds
, andseconds
.frame
second
,sec
,s
millisecond
,msec
,ms
Annotation
annotation this should be obtainable via something like thisopencv
,ffmpeg
, etc), but I don't like to shipmmif-python
package with a fullopencv
dependency. Hence we might need to consider implementing this part as a plugin package.Related
#206 and remotely related to clamsproject/app-east-textdetection#1
Alternatives
We could just leave this implementation to app developers. Some existing code that does time unit conversion
https://github.com/clamsproject/app-east-textdetection/blob/e7f2549fc875fd5c1762a3046de68ea67a82140d/app.py#L71-L81
https://github.com/clamsproject/app-parseq/blob/7f4476775f708f8ee23aaad2dc3210d327b0f8c9/app.py#L27-L38
Additional context
No response
The text was updated successfully, but these errors were encountered: