diff --git a/raw_pose_processing.ipynb b/raw_pose_processing.ipynb index de47f1b..e5577ea 100644 --- a/raw_pose_processing.ipynb +++ b/raw_pose_processing.ipynb @@ -19,6 +19,7 @@ "%matplotlib inline\n", "\n", "import sys, os\n", + "from pathlib import Path\n", "import torch\n", "import numpy as np\n", "import matplotlib\n", @@ -253,7 +254,8 @@ " for path in pbar:\n", " save_path = path.replace('./amass_data', './pose_data')\n", " save_path = save_path[:-3] + 'npy'\n", - " fps = amass_to_pose(path, save_path)\n", + " if not Path(save_path).exists(): # Allow to resume work\n", + " fps = amass_to_pose(path, save_path)\n", " \n", " cur_count += len(paths)\n", " print('Processed / All (fps %d): %d/%d'% (fps, cur_count, all_count) )\n", @@ -328,7 +330,8 @@ "save_dir = './joints'\n", "index_file = pd.read_csv(index_path)\n", "total_amount = index_file.shape[0]\n", - "fps = 20" + "fps = 20\n", + "Path(save_dir).mkdir(exist_ok=True)" ] }, {