Removed unused variables from DeepEncode.py
This commit is contained in:
parent
f43ef69f0d
commit
185e3fac9a
1 changed files with 1 additions and 4 deletions
|
@ -12,7 +12,6 @@ import cv2
|
|||
from video_compression_model import VideoCompressionModel
|
||||
|
||||
# Constants
|
||||
CHUNK_SIZE = 24 # Adjust based on available memory and video resolution
|
||||
COMPRESSED_VIDEO_FILE = 'compressed_video.avi'
|
||||
MAX_FRAMES = 0 # Limit the number of frames processed
|
||||
|
||||
|
@ -37,9 +36,8 @@ def predict_frame(uncompressed_frame):
|
|||
|
||||
#display_frame = np.clip(cv2.cvtColor(uncompressed_frame, cv2.COLOR_BGR2RGB) * 255.0, 0, 255).astype(np.uint8)
|
||||
cv2.imshow("uncomp", uncompressed_frame)
|
||||
cv2.waitKey(1)
|
||||
|
||||
combined_feature, _ = preprocess_frame(uncompressed_frame)
|
||||
combined_feature, frame = preprocess_frame(uncompressed_frame)
|
||||
|
||||
compressed_frame = MODEL.predict(np.expand_dims(combined_feature, axis=0))[0]
|
||||
|
||||
|
@ -72,7 +70,6 @@ for i in range(total_frames):
|
|||
compressed_frame = np.clip(compressed_frame * 255.0, 0, 255).astype(np.uint8)
|
||||
compressed_frame = cv2.cvtColor(compressed_frame, cv2.COLOR_RGB2BGR)
|
||||
out.write(compressed_frame)
|
||||
#cv2.imshow("output", compressed_frame)
|
||||
|
||||
out.release()
|
||||
print("Compression completed.")
|
||||
|
|
Reference in a new issue