diff --git a/modelscope/msdatasets/task_datasets/language_guided_video_summarization_dataset.py b/modelscope/msdatasets/task_datasets/language_guided_video_summarization_dataset.py index ef7ec9d8..94313e15 100644 --- a/modelscope/msdatasets/task_datasets/language_guided_video_summarization_dataset.py +++ b/modelscope/msdatasets/task_datasets/language_guided_video_summarization_dataset.py @@ -2,6 +2,21 @@ # publicly available at https://github.com/e-apostolidis/PGL-SUM, follow the # license https://github.com/e-apostolidis/PGL-SUM/blob/master/LICENSE.md. +# Copyright (c) 2021, Evlampios Apostolidis, Georgios Balaouras, Vasileios Mezaris, +# Ioannis Patras / CERTH-ITI. All rights reserved. This code is provided for academic, +# non-commercial use only. Redistribution and use in source and binary forms, with or without modification, +# are permitted for academic non-commercial use provided that the following conditions are met: + +# Redistributions of source code must retain the above copyright notice, this list of conditions and the following +# disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation provided with the distribution. +# This software is provided by the authors "as is" and any express or implied warranties, including, but not limited to, +# the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the +# authors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but +# not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) +# however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or +# otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. + import os import h5py diff --git a/modelscope/pipelines/cv/language_guided_video_summarization_pipeline.py b/modelscope/pipelines/cv/language_guided_video_summarization_pipeline.py index 2edd59a1..862d4fc7 100755 --- a/modelscope/pipelines/cv/language_guided_video_summarization_pipeline.py +++ b/modelscope/pipelines/cv/language_guided_video_summarization_pipeline.py @@ -91,7 +91,7 @@ class LanguageGuidedVideoSummarizationPipeline(Pipeline): frame_idx += 1 n_frame = frame_idx - if sentences is None: + if sentences is None or len(sentences) == 0: logger.info('input sentences is none, using sentences from video!') tmp_path = os.path.join(self.tmp_dir, 'tmp')