From 3412afd2b0a7a447598d8d6d399e542093491b2d Mon Sep 17 00:00:00 2001 From: sjyan Date: Mon, 7 Oct 2019 16:17:14 +0800 Subject: [PATCH] fix bugs in config files --- .../st_gcn/dataset_example/test.yaml | 8 ++++---- .../st_gcn/dataset_example/train.yaml | 17 ++++++++-------- .../kinetics-skeleton-from-openpose/test.yaml | 8 ++++---- .../train.yaml | 20 +++++++++---------- mmskeleton/datasets/__init__.py | 3 +-- mmskeleton/datasets/skeleton/__init__.py | 1 - mmskeleton/utils/importer.py | 3 ++- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/configs/recognition/st_gcn/dataset_example/test.yaml b/configs/recognition/st_gcn/dataset_example/test.yaml index fde567b69..42c676831 100644 --- a/configs/recognition/st_gcn/dataset_example/test.yaml +++ b/configs/recognition/st_gcn/dataset_example/test.yaml @@ -31,11 +31,11 @@ processor_cfg: data_dir: ./data/dataset_example num_track: 2 pipeline: - - name: "skeleton_process.normalize_by_resolution" - - name: "skeleton_process.mask_by_visibility" - - name: "skeleton_process.transpose" + - name: "datasets.skeleton.normalize_by_resolution" + - name: "datasets.skeleton.mask_by_visibility" + - name: "datasets.skeleton.transpose" order: [0, 2, 1, 3] - - name: "skeleton_process.to_tuple" + - name: "datasets.skeleton.to_tuple" # dataloader setting batch_size: 3 diff --git a/configs/recognition/st_gcn/dataset_example/train.yaml b/configs/recognition/st_gcn/dataset_example/train.yaml index acc2feefe..6271b8075 100644 --- a/configs/recognition/st_gcn/dataset_example/train.yaml +++ b/configs/recognition/st_gcn/dataset_example/train.yaml @@ -38,11 +38,12 @@ processor_cfg: num_track: 2 repeat: 20 pipeline: - - name: "skeleton_process.normalize_by_resolution" - - name: "skeleton_process.mask_by_visibility" - - name: "skeleton_process.transpose" + # - name: "skeleton_process.normalize_by_resolution" + - name: "datasets.skeleton.normalize_by_resolution" + - name: "datasets.skeleton.mask_by_visibility" + - name: "datasets.skeleton.transpose" order: [0, 2, 1, 3] - - name: "skeleton_process.to_tuple" + - name: "datasets.skeleton.to_tuple" - name: "datasets.DataPipeline" data_source: @@ -50,11 +51,11 @@ processor_cfg: data_dir: ./data/dataset_example num_track: 2 pipeline: - - name: "skeleton_process.normalize_by_resolution" - - name: "skeleton_process.mask_by_visibility" - - name: "skeleton_process.transpose" + - name: "datasets.skeleton.normalize_by_resolution" + - name: "datasets.skeleton.mask_by_visibility" + - name: "datasets.skeleton.transpose" order: [0, 2, 1, 3] - - name: "skeleton_process.to_tuple" + - name: "datasets.skeleton.to_tuple" # dataloader setting batch_size: 3 diff --git a/configs/recognition/st_gcn/kinetics-skeleton-from-openpose/test.yaml b/configs/recognition/st_gcn/kinetics-skeleton-from-openpose/test.yaml index 5300c0077..7fb91690c 100644 --- a/configs/recognition/st_gcn/kinetics-skeleton-from-openpose/test.yaml +++ b/configs/recognition/st_gcn/kinetics-skeleton-from-openpose/test.yaml @@ -32,11 +32,11 @@ processor_cfg: data_dir: ./data/Kinetics/skeleton-from-openpose/val num_track: 2 pipeline: - - name: "skeleton_process.normalize_by_resolution" - - name: "skeleton_process.mask_by_visibility" - - name: "skeleton_process.transpose" + - name: "datasets.skeleton.normalize_by_resolution" + - name: "datasets.skeleton.mask_by_visibility" + - name: "datasets.skeleton.transpose" order: [0, 2, 1, 3] - - name: "skeleton_process.to_tuple" + - name: "datasets.skeleton.to_tuple" # dataloader setting batch_size: 256 diff --git a/configs/recognition/st_gcn/kinetics-skeleton-from-openpose/train.yaml b/configs/recognition/st_gcn/kinetics-skeleton-from-openpose/train.yaml index d5c8eb62f..95ade89fa 100644 --- a/configs/recognition/st_gcn/kinetics-skeleton-from-openpose/train.yaml +++ b/configs/recognition/st_gcn/kinetics-skeleton-from-openpose/train.yaml @@ -37,14 +37,14 @@ processor_cfg: data_dir: ./data/Kinetics/skeleton-from-openpose/train num_track: 2 pipeline: - - name: "skeleton_process.normalize_by_resolution" - - name: "skeleton_process.mask_by_visibility" - - name: "skeleton_process.temporal_repeat" + - name: "datasets.skeleton.normalize_by_resolution" + - name: "datasets.skeleton.mask_by_visibility" + - name: "datasets.skeleton.temporal_repeat" size: 150 - - name: "skeleton_process.simulate_camera_moving" - - name: "skeleton_process.transpose" + - name: "datasets.skeleton.simulate_camera_moving" + - name: "datasets.skeleton.transpose" order: [0, 2, 1, 3] - - name: "skeleton_process.to_tuple" + - name: "datasets.skeleton.to_tuple" - name: "datasets.DataPipeline" data_source: @@ -52,11 +52,11 @@ processor_cfg: data_dir: ./data/Kinetics/skeleton-from-openpose/val num_track: 2 pipeline: - - name: "skeleton_process.normalize_by_resolution" - - name: "skeleton_process.mask_by_visibility" - - name: "skeleton_process.transpose" + - name: "datasets.skeleton.normalize_by_resolution" + - name: "datasets.skeleton.mask_by_visibility" + - name: "datasets.skeleton.transpose" order: [0, 2, 1, 3] - - name: "skeleton_process.to_tuple" + - name: "datasets.skeleton.to_tuple" # dataloader setting diff --git a/mmskeleton/datasets/__init__.py b/mmskeleton/datasets/__init__.py index 4b44720c4..e5b7fb9e1 100644 --- a/mmskeleton/datasets/__init__.py +++ b/mmskeleton/datasets/__init__.py @@ -1,4 +1,3 @@ -from .skeleton_feeder import SkeletonFeeder from .coco import COCODataset from .data_pipeline import DataPipeline -from .skeleton_dataset import SkeletonLoader \ No newline at end of file +from .skeleton import SkeletonLoader \ No newline at end of file diff --git a/mmskeleton/datasets/skeleton/__init__.py b/mmskeleton/datasets/skeleton/__init__.py index 3d6aee1f3..f6556a05a 100644 --- a/mmskeleton/datasets/skeleton/__init__.py +++ b/mmskeleton/datasets/skeleton/__init__.py @@ -1,3 +1,2 @@ from .loader import SkeletonLoader -from .cache_loader import SkeletonCacheLoader from .skeleton_process import * \ No newline at end of file diff --git a/mmskeleton/utils/importer.py b/mmskeleton/utils/importer.py index 799feec31..f9ce575c4 100644 --- a/mmskeleton/utils/importer.py +++ b/mmskeleton/utils/importer.py @@ -15,7 +15,8 @@ def import_obj(name): except ModuleNotFoundError: if name[0:11] != 'mmskeleton.': return import_obj('mmskeleton.' + name) - raise ImportError('Object {} cannot be found.'.format(class_str)) + raise ModuleNotFoundError('Object {} cannot be found in {}.'.format( + class_str, mod_str)) def call_obj(name, **kwargs):