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