Download EgoHOS/raw/script/mmsegmentation/cleanup_ckpt.py from ParityLab/Hand-Datasets-Raw: direct link, hf CLI and curl.
- Browser
- Download file 260 Bytes
-
https://huggingface.co/datasets/ParityLab/Hand-Datasets-Raw/resolve/main/EgoHOS/raw/script/mmsegmentation/cleanup_ckpt.py
- Command line
-
hf download hf://datasets/ParityLab/Hand-Datasets-Raw/EgoHOS/raw/script/mmsegmentation/cleanup_ckpt.py
-
curl -L -o cleanup_ckpt.py https://huggingface.co/datasets/ParityLab/Hand-Datasets-Raw/resolve/main/EgoHOS/raw/script/mmsegmentation/cleanup_ckpt.py
260 Bytes
| import glob | |
| import pdb | |
| import os | |
| ckpt_dir = './work_dirs' | |
| for ckpt_file in glob.glob(ckpt_dir + '/**/*.pth'): | |
| if 'best' in ckpt_file: | |
| print('keep : ', ckpt_file) | |
| else: | |
| print('remove: ', ckpt_file) | |
| os.remove(ckpt_file) | |