diff --git a/DeepEncode.py b/DeepEncode.py index fc7ba24..8c20ecd 100644 --- a/DeepEncode.py +++ b/DeepEncode.py @@ -7,10 +7,10 @@ from video_compression_model import VideoCompressionModel NUM_CHANNELS = 3 # Step 2: Load the trained model -model = tf.keras.models.load_model('ai_rate_control_model.keras', custom_objects={'VideoCompressionModel': VideoCompressionModel}) +model = tf.keras.models.load_model('models/model.keras', custom_objects={'VideoCompressionModel': VideoCompressionModel}) # Step 3: Load the uncompressed video -UNCOMPRESSED_VIDEO_FILE = 'test_video.mkv' +UNCOMPRESSED_VIDEO_FILE = 'test_data/test_video.mkv' def load_frames_from_video(video_file, num_frames = 0): print("Extracting video frames...") diff --git a/train_model.py b/train_model.py index e3d961a..304c483 100644 --- a/train_model.py +++ b/train_model.py @@ -10,8 +10,8 @@ BATCH_SIZE = 32 # Batch size used during training EPOCHS = 20 # Number of training epochs # Step 1: Data Preparation -TRAIN_VIDEO_FILE = 'native_video.mkv' # The training video file name -VAL_VIDEO_FILE = 'training_video.mkv' # The validation video file name +TRAIN_VIDEO_FILE = 'test_data/native_video.mkv' # The training video file name +VAL_VIDEO_FILE = 'test_data/training_video.mkv' # The validation video file name TRAIN_SAMPLES = 2 # Number of video frames used for training VAL_SAMPLES = 2 # Number of video frames used for validation @@ -77,5 +77,5 @@ model.fit( print("\nTraining completed.") # Step 3: Save the trained model -model.save('ai_rate_control_model.keras') +model.save('models/model.keras') print("Model saved successfully!")