Rob Hallam
180e98db84
fix: another tiny formatting fix
D'oh
hace 2 meses
Rob Hallam
41a2e3298c
fix: fix formatting of issue links in README
hace 2 meses
Rob Hallam
4d05d1472d
feat: add README
hace 2 meses
Rob Hallam
2037cc3c2d
Merge branch 'feat-exemplar-scripts'
hace 2 meses
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.
hace 2 meses
Rob Hallam
4f1ba7a370
chore: add requirements.txt
hace 2 meses
Rob Hallam
8d1866093c
Merge branch 'refactor-codequality'
hace 2 meses
Rob Hallam
65e1a6665e
Merge branch 'feat-config'
Adds config to isualisation and JSON producers
hace 2 meses
Rob Hallam
e0468baead
feat: [VidP] permit config output destination
hace 2 meses
Rob Hallam
5ca6f9e9d0
test: [WordFE] cover non-batched
hace 2 meses
Rob Hallam
c8d414565d
test: [WordFE] test call to model.transcribe()
hace 2 meses
Rob Hallam
e7a9bae601
test: VAFE _keep_num test
hace 2 meses
Rob Hallam
2327048212
fix: fix LaughFE broken test for no featurres & VAFE keep_num check
hace 2 meses
Rob Hallam
c14745dcde
test: test _keep_num trimming overlap
hace 2 meses
Rob Hallam
d4a11b6e29
refactor: move _keep_num to base FeatureExtractor class
hace 2 meses
Rob Hallam
a6bd196e39
test: [LoudFE._keep_min] test min duration
hace 2 meses
Rob Hallam
d72b9ea2a4
test: [VizProd] simple colour test
hace 2 meses
Rob Hallam
55b532f1eb
test: fix LoudFE tests
hace 2 meses
Rob Hallam
4bec7a8ecc
fix: stop FEs incorrectly dropping some Features
_keep_num() was incorrectly detecting overlaps
hace 2 meses
Rob Hallam
3173babcff
test: add 'missing' tests
Identified when checking coverage while only testing utils
hace 2 meses
Rob Hallam
4cf406935b
test: test Interval.overlaps()
hace 2 meses
Rob Hallam
4a05a94784
feat: [Interval] add overlaps() method
Found to be useful when writing tests
hace 2 meses
Rob Hallam
a9323196d6
Merge branch 'feat-exemplar-scripts'
hace 2 meses
Rob Hallam
97401aa84f
fix: [LaughFE] restore check for input files
hace 2 meses
Rob Hallam
0bd39a1415
feat: [VizP] different colours for different FEs
hace 2 meses
Rob Hallam
c1ec2adb9f
feat: [VP] make compiling clips into a video optional
hace 2 meses
Rob Hallam
eda55da82d
refactor: improve docstrings, move laughter FE loc to config
hace 2 meses
Rob Hallam
460819d678
feat: Update LoudFE & VAFE to not keep adjacent features
Otherwise features tend to cluster
hace 2 meses
Rob Hallam
2bea733906
Merge branch 'fix-vafe-and-loudfe' into feat-exemplar-scripts
hace 2 meses
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
hace 2 meses
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
hace 2 meses
Rob Hallam
d0a1779421
Merge branch 'feat-adjusters' into feat-exemplar-scripts
hace 2 meses
Rob Hallam
c53704cf7c
test: update mocket get_loudnesses & test _keep_num
hace 2 meses
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)
hace 2 meses
Rob Hallam
a793fe08ce
test: [TTA] add coverage of adjust()
Add test cases that require reducing the number of Features
hace 2 meses
Rob Hallam
4e42137b33
test: [mocks] add convenience classmethod and __eq__
Facilitates unit tests of TTA
hace 2 meses
Rob Hallam
dfb5cbd1ef
test: add tests of sorting first by score then by time
hace 2 meses
Rob Hallam
d0935f950f
feat: [TTA] _sort_by_score_time()
Pull out a one-liner for test scenarios to facilitate testing adjust()
hace 2 meses
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
hace 2 meses
Rob Hallam
5365d7d1e2
test: [_determine_margin] add TTA._STRATEGY.PERCENT unit tests
Test _determine_margin() with margins specified as percentage
hace 2 meses
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.
hace 2 meses
Rob Hallam
764083b001
fix: duration is an attribute of Interval, not Feature
hace 2 meses
Rob Hallam
4ffe712ce2
test: [TTA] add unit tests for _determine_margin -- ABSOLUTE
hace 2 meses
Rob Hallam
15ca7cb6fa
fix: negative total durations should not be possible
hace 2 meses
Rob Hallam
43fe240c40
test: TargetTimeAdjuster - test init and _features_total_time
hace 2 meses
Rob Hallam
62932f6b08
test: add test of generic Adjuster base class
hace 2 meses
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' ??
hace 2 meses
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
hace 2 meses
Rob Hallam
391f838149
Merge branch 'test-fes-functional'
hace 2 meses
Rob Hallam
1ea881fc67
test: add negative test for LaughFE
Also rename positive test to indicate that
hace 2 meses