stzhao's picture
download
raw
3.32 kB
# Run UMAP on a single latent .npz
./.venv/bin/python data_processing/umap_alg.py \
--input /mnt/posttrain/zhaoshitian/datasets/ucf101/manifold-analysis-preprocessed/video_features/ucf101_train_split1_dinov2_wreg_base/ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01_patch_tokens.npz \
--output /tmp/dinov2_umap.png
# Run UMAP and mark GOP boundaries from the source video
./.venv/bin/python data_processing/umap_alg.py \
--input /mnt/posttrain/zhaoshitian/datasets/ucf101/manifold-analysis-preprocessed/video_features/ucf101_train_split1_dinov2_wreg_base/ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01_patch_tokens.npz \
--gop-video-path /mnt/posttrain/zhaoshitian/datasets/ucf101/OpenDataLab___UCF101/raw/data/UCF-101/ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01.avi \
--output /tmp/dinov2_umap_gop.png
# Use flattened frame vectors instead of mean pooling
./.venv/bin/python data_processing/umap_alg.py \
--input /mnt/posttrain/zhaoshitian/datasets/ucf101/manifold-analysis-preprocessed/video_features/ucf101_train_split1_dinov2_wreg_base/ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01_patch_tokens.npz \
--projection flatten \
--output /tmp/dinov2_umap_flatten.png
# Compare the same video across dinov2, mae, siglip2, and flux2_ae in one command
./.venv/bin/python data_processing/umap_alg.py \
--input \
/mnt/posttrain/zhaoshitian/datasets/ucf101/manifold-analysis-preprocessed/video_features/ucf101_train_split1_dinov2_wreg_base/ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01_patch_tokens.npz \
/mnt/posttrain/zhaoshitian/datasets/ucf101/manifold-analysis-preprocessed/video_features/ucf101_train_split1_mae_base_p16/ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01_patch_tokens.npz \
/mnt/posttrain/zhaoshitian/datasets/ucf101/manifold-analysis-preprocessed/video_features/ucf101_train_split1_siglip2_base_p16_i256/ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01_patch_tokens.npz \
/mnt/posttrain/zhaoshitian/datasets/ucf101/manifold-analysis-preprocessed/video_features/ucf101_train_split1_flux2_ae/ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01_patch_tokens.npz \
--output-dir /mnt/posttrain/zhaoshitian/datasets/ucf101/manifold-analysis-preprocessed/video_features/umap_plots \
--projection mean_pool
# # read a different key from an npz file
# ./.venv/bin/python data_processing/umap_alg.py --input /path/to/features.npz --input-key my_features
# # run multiple inputs and store per-model plots under one root directory
# ./.venv/bin/python data_processing/umap_alg.py --input /path/a.npz /path/b.npz --output-dir /path/to/umap_plots
# # try cosine distance instead of euclidean
# ./.venv/bin/python data_processing/umap_alg.py --input /path/to/features.npy --metric cosine
# # tune the UMAP geometry
# ./.venv/bin/python data_processing/umap_alg.py --input /path/to/features.npy --n_neighbors 30 --min_dist 0.0
# # hide the frame-index colorbar
# ./.venv/bin/python data_processing/umap_alg.py --input /path/to/features.npy --no_colorbar
# # explicitly provide the source video and mark GOP starts
# ./.venv/bin/python data_processing/umap_alg.py --input /path/to/features.npz --gop-video-path /path/to/video.mp4
# # infer source videos from a shared dataset root and mark GOP starts
# ./.venv/bin/python data_processing/umap_alg.py --input /path/a_patch_tokens.npz /path/b_patch_tokens.npz --gop-video-root /path/to/videos

Xet Storage Details

Size:
3.32 kB
·
Xet hash:
f5fc3962ecff11fe0fbf21bed425e2617ce47914185b095ee4db8d3a9fa0d63e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.