Download dataset_code/spatialvid/get_data_dist.py from SuperCS/useful_code: direct link, hf CLI and curl.
- Browser
- Download file 498 Bytes
-
https://huggingface.co/datasets/SuperCS/useful_code/resolve/a15ff044296b40dcb1cd3f65de1e0cd84a0150ec/dataset_code/spatialvid/get_data_dist.py
- Command line
-
hf download hf://datasets/SuperCS/useful_code@a15ff044296b40dcb1cd3f65de1e0cd84a0150ec/dataset_code/spatialvid/get_data_dist.py
-
curl -L -o get_data_dist.py https://huggingface.co/datasets/SuperCS/useful_code/resolve/a15ff044296b40dcb1cd3f65de1e0cd84a0150ec/dataset_code/spatialvid/get_data_dist.py
498 Bytes
| import pandas as pd | |
| # 读取 CSV 文件 | |
| df = pd.read_csv("/mnt/bn/yufan-dev-my/ysh/Ckpts/SpatialVID/SpatialVID-HQ/data/train/SpatialVID_HQ_metadata.csv") | |
| # 统计各字段的数量分布 | |
| num_frames_count = df['num frames'].value_counts() | |
| fps_count = df['fps'].value_counts() | |
| resolution_count = df['resolution'].value_counts() | |
| # 输出结果 | |
| print("num_frames 分布:") | |
| print(num_frames_count) | |
| print("\nfps 分布:") | |
| print(fps_count) | |
| print("\nresolution 分布:") | |
| print(resolution_count) | |