(path)
| 15 | os.makedirs(out_dir, exist_ok=True) |
| 16 | |
| 17 | def load_tensor(path): |
| 18 | data = np.fromfile(path + ".bin", dtype=np.float32) |
| 19 | if os.path.exists(path + ".shape"): |
| 20 | with open(path + ".shape") as f: |
| 21 | shape = [int(x) for x in f.read().strip().split(",") if x] |
| 22 | return data.reshape(shape) if shape else data |
| 23 | return data |
| 24 | |
| 25 | for fi in [1, 2, 5, 10, 20, 30, 40, 50]: |
| 26 | frame_path = os.path.join(video_dir, f"{fi:05d}.jpg") |
no outgoing calls
no test coverage detected