(file_path)
| 137 | |
| 138 | |
| 139 | def check(file_path): |
| 140 | # 检查并重命名 `pose.json` 为 `pose.jsonl` |
| 141 | pose_json_path = os.path.join(file_path, 'pose.json') |
| 142 | pose_jsonl_path = os.path.join(file_path, 'pose.jsonl') |
| 143 | |
| 144 | if os.path.exists(pose_json_path): |
| 145 | os.rename(pose_json_path, pose_jsonl_path) |
| 146 | |
| 147 | # 检查是否存在 `pose.jsonl` |
| 148 | if os.path.exists(pose_jsonl_path): |
| 149 | json_object = read_jsonl(pose_jsonl_path) |
| 150 | |
| 151 | acts_len = len(json_object) |
| 152 | imgs_len = count_png_images(file_path) # 获取 PNG 图片数量 |
| 153 | |
| 154 | # 验证动作长度和图片数量的关系 |
| 155 | return acts_len == imgs_len |
| 156 | else: |
| 157 | return False |
| 158 | |
| 159 | |
| 160 | def process_act(actions): |
nothing calls this directly
no test coverage detected