Upload folder using huggingface_hub
Browse files- __pycache__/predict.cpython-311.pyc +0 -0
- predict.py +3 -0
__pycache__/predict.cpython-311.pyc
CHANGED
|
Binary files a/__pycache__/predict.cpython-311.pyc and b/__pycache__/predict.cpython-311.pyc differ
|
|
|
predict.py
CHANGED
|
@@ -175,6 +175,9 @@ def predict_next_frame(ens, context_frames: np.ndarray) -> np.ndarray:
|
|
| 175 |
for i in range(PRED_FRAMES):
|
| 176 |
frame = np.transpose(predicted_np[i], (1, 2, 0))
|
| 177 |
frame = (frame * 255).clip(0, 255).astype(np.uint8)
|
|
|
|
|
|
|
|
|
|
| 178 |
ens.direct_cache.append(frame)
|
| 179 |
|
| 180 |
result = ens.direct_cache[ens.cache_step]
|
|
|
|
| 175 |
for i in range(PRED_FRAMES):
|
| 176 |
frame = np.transpose(predicted_np[i], (1, 2, 0))
|
| 177 |
frame = (frame * 255).clip(0, 255).astype(np.uint8)
|
| 178 |
+
# Pong post-processing: threshold dark/bright pixels
|
| 179 |
+
frame[frame < 8] = 0
|
| 180 |
+
frame[frame > 247] = 255
|
| 181 |
ens.direct_cache.append(frame)
|
| 182 |
|
| 183 |
result = ens.direct_cache[ens.cache_step]
|