From 17d325a0561274819f9f32c57b62a00a132091da Mon Sep 17 00:00:00 2001 From: binke Date: Tue, 7 May 2024 14:31:54 +0800 Subject: [PATCH] merge main --- configs/demo/sandbox/vbench_eval_config.yaml | 13 +++++++------ data_juicer/core/sandbox/evaluators.py | 3 ++- environments/sandbox_requires.txt | 6 +++++- tools/sandbox_starter.py | 3 ++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/configs/demo/sandbox/vbench_eval_config.yaml b/configs/demo/sandbox/vbench_eval_config.yaml index b53b45ea8..f760d210a 100644 --- a/configs/demo/sandbox/vbench_eval_config.yaml +++ b/configs/demo/sandbox/vbench_eval_config.yaml @@ -17,10 +17,11 @@ load_ckpt_from_local: false # The dimensions considered in this eval. # All dimensions include: ['subject_consistency', 'background_consistency', -# 'temporal_flickering', 'motion_smoothness', 'dynamic_degree', -# 'aesthetic_quality', 'imaging_quality', 'object_class', -# 'multiple_objects', 'human_action', 'color', 'spatial_relationship', -# 'scene', 'temporal_style', 'appearance_style', 'overall_consistency'] +# 'temporal_flickering', 'dynamic_degree', 'aesthetic_quality', +# 'object_class', 'multiple_objects', 'human_action', 'color', +# 'spatial_relationship', 'scene', 'temporal_style', +# 'appearance_style', 'overall_consistency'] +# NOTE: the evaluation of motion_smoothness and imaging_quality has bug in the pipy vbench repository. dimension_list: - -subject_consistency - -dynamic_degree + - subject_consistency + - dynamic_degree diff --git a/data_juicer/core/sandbox/evaluators.py b/data_juicer/core/sandbox/evaluators.py index a67e42d0f..c1c289e3e 100644 --- a/data_juicer/core/sandbox/evaluators.py +++ b/data_juicer/core/sandbox/evaluators.py @@ -1,5 +1,6 @@ import os import shutil +import torch from vbench import VBench from data_juicer import cuda_device_count @@ -101,7 +102,7 @@ def run(self, eval_type, eval_obj, **kwargs): else: device = torch.device("cpu") my_vbench = VBench(device, prompt_path, result_dir) - my_VBench.evaluate( + my_vbench.evaluate( videos_path = videos_path, name = name, dimension_list = dimension_list, diff --git a/environments/sandbox_requires.txt b/environments/sandbox_requires.txt index c8dab43cf..cf0048038 100644 --- a/environments/sandbox_requires.txt +++ b/environments/sandbox_requires.txt @@ -1,2 +1,6 @@ torch -vbench \ No newline at end of file +vbench +wandb +fire +pyspark +detectron2@git+https://github.com/facebookresearch/detectron2.git@v0.6 \ No newline at end of file diff --git a/tools/sandbox_starter.py b/tools/sandbox_starter.py index 7b8298b50..8f2fe3771 100644 --- a/tools/sandbox_starter.py +++ b/tools/sandbox_starter.py @@ -2,8 +2,9 @@ import yaml from loguru import logger +from jsonargparse import dict_to_namespace -from data_juicer.config import dict_to_namespace, init_configs +from data_juicer.config import init_configs from data_juicer.core.sandbox.pipelines import SandBoxExecutor