Views
No views yet
savedmodel/: TensorFlow SavedModel directory (weights + graph)infer/: minimal inference helpers (black-box loader + IO)predict.py: CLI that outputs prediction imagesanomaly.py: CLI that outputs per-frame anomaly scores (ahat_error + 1-SSIM vectors)pip install -r requirements.txtframes_dir should contain ordered image frames (e.g. 0001.png, 0002.png, ...).python predict.py --model_dir savedmodel --frames_dir /path/to/frames --out_dir outputs --save_sequence_gridoutputs/pred_last.pngoutputs/pred_sequence_grid.png (optional)frames stored as [T,H,W,C] or [B,T,H,W,C].python predict.py --array frames.npy --out_dir outputst, this computes two vectors of length 4:ahat_error[1..4]: mean absolute error between pred_frame_k and GT_frame_4dissim_1mssim[1..4]: 1 - SSIM(pred_frame_k, GT_frame_4)python anomaly.py --model_dir savedmodel --frames_dir /path/to/frames --out_json anomaly.json --out_csv anomaly.csvhuggingface_hub and point --model_dir at the downloaded savedmodel/ directory.1from transformers import pipeline
2import numpy as np
3
4pipe = pipeline(
5 "video-frame-prediction",
6 model="dvdface/denoising-prednet",
7 trust_remote_code=True,
8)
9
10# frames: [T, H, W, C] numpy array, uint8 (0-255) or float (0-1)
11frames = np.random.randint(0, 255, (4, 128, 128, 3), dtype=np.uint8)
12result = pipe(frames)
13
14print(result["sequence"].shape) # (4, 128, 128, 3)
15print(result["last_frame"].shape) # (128, 128, 3)