Downloads · 30 days
0
haythamgggg/9878
9878 is a machine learning model from haythamgggg. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
0
Access
Public
Updated Jul 12, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 74%
From the Hugging Face model README
import cv2 import numpy as np
img = cv2.imread("your_image.jpg")
frames = [] for i in range(30): frame = img.copy() dx = int(2 * np.sin(i * 0.3)) M = np.float32([[1, 0, dx], [0, 1, 0]]) shifted = cv2.warpAffine(frame, M, (frame.shape[1], frame.shape[0])) frames.append(shifted)
out = cv2.VideoWriter('animated.avi', cv2.VideoWriter_fourcc(*'XVID'), 10, (img.shape[1], img.shape[0])) for frame in frames: out.write(frame) out.release()