Rob Hallam
180e98db84
fix: another tiny formatting fix
D'oh
vor 2 Monaten
Rob Hallam
41a2e3298c
fix: fix formatting of issue links in README
vor 2 Monaten
Rob Hallam
4d05d1472d
feat: add README
vor 2 Monaten
Rob Hallam
2037cc3c2d
Merge branch 'feat-exemplar-scripts'
vor 2 Monaten
Rob Hallam
65cb224d6b
feat: add two exemplar scripts
Fairly basic, could obviously be refactored but they are there to be exemplars
to give folks an idea of where they can start with the pipeline.
vor 2 Monaten
Rob Hallam
4f1ba7a370
chore: add requirements.txt
vor 2 Monaten
Rob Hallam
8d1866093c
Merge branch 'refactor-codequality'
vor 2 Monaten
Rob Hallam
65e1a6665e
Merge branch 'feat-config'
Adds config to isualisation and JSON producers
vor 2 Monaten
Rob Hallam
e0468baead
feat: [VidP] permit config output destination
vor 2 Monaten
Rob Hallam
5ca6f9e9d0
test: [WordFE] cover non-batched
vor 2 Monaten
Rob Hallam
c8d414565d
test: [WordFE] test call to model.transcribe()
vor 2 Monaten
Rob Hallam
e7a9bae601
test: VAFE _keep_num test
vor 2 Monaten
Rob Hallam
2327048212
fix: fix LaughFE broken test for no featurres & VAFE keep_num check
vor 2 Monaten
Rob Hallam
c14745dcde
test: test _keep_num trimming overlap
vor 2 Monaten
Rob Hallam
d4a11b6e29
refactor: move _keep_num to base FeatureExtractor class
vor 2 Monaten
Rob Hallam
a6bd196e39
test: [LoudFE._keep_min] test min duration
vor 2 Monaten
Rob Hallam
d72b9ea2a4
test: [VizProd] simple colour test
vor 2 Monaten
Rob Hallam
55b532f1eb
test: fix LoudFE tests
vor 2 Monaten
Rob Hallam
4bec7a8ecc
fix: stop FEs incorrectly dropping some Features
_keep_num() was incorrectly detecting overlaps
vor 2 Monaten
Rob Hallam
3173babcff
test: add 'missing' tests
Identified when checking coverage while only testing utils
vor 2 Monaten
Rob Hallam
4cf406935b
test: test Interval.overlaps()
vor 2 Monaten
Rob Hallam
4a05a94784
feat: [Interval] add overlaps() method
Found to be useful when writing tests
vor 2 Monaten
Rob Hallam
a9323196d6
Merge branch 'feat-exemplar-scripts'
vor 2 Monaten
Rob Hallam
97401aa84f
fix: [LaughFE] restore check for input files
vor 2 Monaten
Rob Hallam
0bd39a1415
feat: [VizP] different colours for different FEs
vor 2 Monaten
Rob Hallam
c1ec2adb9f
feat: [VP] make compiling clips into a video optional
vor 2 Monaten
Rob Hallam
eda55da82d
refactor: improve docstrings, move laughter FE loc to config
vor 2 Monaten
Rob Hallam
460819d678
feat: Update LoudFE & VAFE to not keep adjacent features
Otherwise features tend to cluster
vor 2 Monaten
Rob Hallam
2bea733906
Merge branch 'fix-vafe-and-loudfe' into feat-exemplar-scripts
vor 2 Monaten
Rob Hallam
7c196e43b2
feat: adjust LoudFE._keen_num() to work as VAFE._keep_num
As with VAFE, update LoudFE to expand to min duration when keeping n features
see: 72fc6b563b
vor 2 Monaten
Rob Hallam
72fc6b563b
feat: modify VAFE to keep only n expanded Features
The problem that I had overlooked until now (!!) due to only using small
exemplar videos for testing was that VideoActivityFeatureExtractor keeps
a fraction of small (0.5s) Features. This is not so problematic for a short
exemplar video, but ends up witha lot of jumpy Features in an actual source
video.
Fix approach:
Like LoudnessFE, keep a specific number and expand the duration (which I think I
will do for LoudnessFE too), dropping any that would be consumed in that range
vor 2 Monaten
Rob Hallam
d0a1779421
Merge branch 'feat-adjusters' into feat-exemplar-scripts
vor 2 Monaten
Rob Hallam
c53704cf7c
test: update mocket get_loudnesses & test _keep_num
vor 2 Monaten
Rob Hallam
e716f5d80a
feat: [LoudFE] keep only N top loudness Features
add LoudAudioFeatureExtractor._num_features (set in init, default: 5)
add _keep_num -- takes list of loudnesses and keeps top N (default: 5)
vor 2 Monaten
Rob Hallam
a793fe08ce
test: [TTA] add coverage of adjust()
Add test cases that require reducing the number of Features
vor 2 Monaten
Rob Hallam
4e42137b33
test: [mocks] add convenience classmethod and __eq__
Facilitates unit tests of TTA
vor 2 Monaten
Rob Hallam
dfb5cbd1ef
test: add tests of sorting first by score then by time
vor 2 Monaten
Rob Hallam
d0935f950f
feat: [TTA] _sort_by_score_time()
Pull out a one-liner for test scenarios to facilitate testing adjust()
vor 2 Monaten
Rob Hallam
e22ece92ba
test: [TTA: adjust] test adjustments that result in no change
Cases:
- no features
- features under target duration
- features equal to target duration
vor 2 Monaten
Rob Hallam
5365d7d1e2
test: [_determine_margin] add TTA._STRATEGY.PERCENT unit tests
Test _determine_margin() with margins specified as percentage
vor 2 Monaten
Rob Hallam
f253250239
feat: [TTA] add algo for dropping Features in adjust()
Tries to drop the lowest-scoring Features until the target time (range) is
reached. This is not optimised and a relatively naïve approach- there are many
inputs which would result in a non-ideal pruning.
vor 2 Monaten
Rob Hallam
764083b001
fix: duration is an attribute of Interval, not Feature
vor 2 Monaten
Rob Hallam
4ffe712ce2
test: [TTA] add unit tests for _determine_margin -- ABSOLUTE
vor 2 Monaten
Rob Hallam
15ca7cb6fa
fix: negative total durations should not be possible
vor 2 Monaten
Rob Hallam
43fe240c40
test: TargetTimeAdjuster - test init and _features_total_time
vor 2 Monaten
Rob Hallam
62932f6b08
test: add test of generic Adjuster base class
vor 2 Monaten
Rob Hallam
b025f0ea10
feat: [wip] TargetTimeAdjuster set up structure & helpers
TargetTimeAdjuster will adjust a list of Features until it is within an optional
margin of a target total duration.
Helper functions:
- _determine_margin() :: figure out the max and min cutoff times, considering
margin and margin strategy (percent / absolute)
- _features_total_time() :: basic sum of list of Features' durations
TODO: rename to TargetDurationAdjuster ? rename 'strategy' ??
vor 2 Monaten
Rob Hallam
e46da363e0
feat: imlpement generic Adjuster class
Adjusters will be used to modify a list of Features. This could either be:
- to modify the overall set (eg to target a time)
- to modify individual Features
The most important Adjuster will be one that targets an overall time, eg:
"modify this list of Features such that their times add up to 1 minute (either ±
a % or a hard limit)"
@see : feature_extractors.py::FeatureExtractor
vor 2 Monaten
Rob Hallam
391f838149
Merge branch 'test-fes-functional'
vor 2 Monaten
Rob Hallam
1ea881fc67
test: add negative test for LaughFE
Also rename positive test to indicate that
vor 2 Monaten