diff --git a/official/cv/c3d/README.md b/official/cv/c3d/README.md index 1b8738b40aea9baeae9827173da5221e6cd19ebb..81159d121fb48de70f963659b3a83eca7f374408 100644 --- a/official/cv/c3d/README.md +++ b/official/cv/c3d/README.md @@ -425,11 +425,13 @@ eval result: top_1 79.381% ### [Export MindIR](#contents) ```shell -python export.py --ckpt_file [CKPT_PATH] --file_name [FILE_NAME] --file_format [FILE_FORMAT] +python export.py --ckpt_file [CKPT_PATH] --mindir_file_name [FILE_NAME] --file_format [FILE_FORMAT] --num_classes [NUM_CLASSES] --batch_size [BATCH_SIZE] ``` -The ckpt_file parameter is required, -`file_format` should be in ["AIR", "MINDIR"] +- `ckpt_file` parameter is mandotory. +- `file_format` should be in ["AIR", "MINDIR"]. +- `NUM_CLASSES` Number of total classes in the dataset, 51 for HMDB51 and 101 for UCF101. +- `BATCH_SIZE` Since currently mindir does not support dynamic shapes, this network only supports inference with batch_size of 1. ### Infer on Ascend310 diff --git a/official/cv/c3d/default_config.yaml b/official/cv/c3d/default_config.yaml index d547a2826abf031732e3f9c883c9c50fa77092a8..4690d074605ff122c22ed19dffe2d9f7c05f3dd9 100644 --- a/official/cv/c3d/default_config.yaml +++ b/official/cv/c3d/default_config.yaml @@ -58,5 +58,5 @@ mindir_file_name: 'C3D' # Save file path file_format: 'MINDIR' # Save file format # 310 infer -pre_result_path: './pre_result_path' # Mindspore ckpt file path -post_result_path: './result_Files' # Save file path +pre_result_path: './preprocess_Result' # save preprocess result file path +post_result_path: './result_Files' # Save postprocess result file path diff --git a/official/cv/c3d/preprocess.py b/official/cv/c3d/preprocess.py index ab501930e9abe184854a70e565117a6a19b50db1..8a8de2150c4a8fd42e3f848efb73a2ab25c137f3 100644 --- a/official/cv/c3d/preprocess.py +++ b/official/cv/c3d/preprocess.py @@ -31,7 +31,6 @@ def gen_bin(data_dir): image_path = os.path.join(data_dir, "image") label_path = os.path.join(data_dir, "label_bs" + str(config.batch_size) + ".npy") - os.makedirs(image_path) label_list = [] for index, (input_data, label) in enumerate(dataset):