Skip to content

Commit fc3d4be

Browse files
committed
requested changes for PR review
1 parent 1da1228 commit fc3d4be

File tree

4 files changed

+5
-27
lines changed

4 files changed

+5
-27
lines changed

.github/for-clams-team.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

app.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ def _annotate(self, mmif: Union[str, dict, Mmif], **parameters) -> Mmif:
4141
# one view per video document
4242
new_view = mmif.new_view()
4343
self.sign_view(new_view, parameters)
44-
config = parameters
45-
new_view.new_contain(AnnotationTypes.BoundingBox, document=videodocument.id, timeUnit=config["timeUnit"])
44+
new_view.new_contain(AnnotationTypes.BoundingBox, document=videodocument.id, timeUnit=parameters["timeUnit"])
4645
self.logger.debug(f"Running on video {videodocument.location_path()}")
47-
mmif = self.run_on_video(mmif, videodocument, new_view, **config)
46+
mmif = self.run_on_video(mmif, videodocument, new_view, **parameters)
4847

4948
# Run app on contained ImageDocument(s) in MMIF
5049
if mmif.get_documents_by_type(DocumentTypes.ImageDocument):
@@ -107,7 +106,7 @@ def run_on_video(self, mmif: Mmif, videodocument: Document, new_view: View, **co
107106
target_frames = vdh.sample_frames(
108107
start_frame=0,
109108
end_frame=min(int(config['stopAt']), videodocument.get_property("frameCount")),
110-
sample_rate=config['sampleRatio']
109+
sample_rate=config['sampleRate']
111110
)
112111

113112
target_frames.sort()

metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def appmetadata() -> AppMetadata:
3939
description="Segments of video to run on. Only works with VideoDocument input and TimeFrame input. Empty value means run on the every frame types.",
4040
)
4141
metadata.add_parameter(
42-
name="sampleRatio",
42+
name="sampleRate",
4343
type="integer",
4444
default=30,
4545
description="Frequency to sample frames. Only works with VideoDocument input, and without TimeFrame input. (when `TimeFrame` annotation is found, this parameter is ignored.)",

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
clams-python==1.2.3
1+
clams-python==1.2.4
22

33
opencv-python-rolling==4.7.* # standard 4.7.x version (no rolling release) has bug with old CPUs
44
imutils

0 commit comments

Comments
 (0)