Changed video and model paths to new location
This commit is contained in:
parent
58fcf819ee
commit
80c5f2216d
2 changed files with 5 additions and 5 deletions
|
@ -7,10 +7,10 @@ from video_compression_model import VideoCompressionModel
|
||||||
NUM_CHANNELS = 3
|
NUM_CHANNELS = 3
|
||||||
|
|
||||||
# Step 2: Load the trained model
|
# 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
|
# 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):
|
def load_frames_from_video(video_file, num_frames = 0):
|
||||||
print("Extracting video frames...")
|
print("Extracting video frames...")
|
||||||
|
|
|
@ -10,8 +10,8 @@ BATCH_SIZE = 32 # Batch size used during training
|
||||||
EPOCHS = 20 # Number of training epochs
|
EPOCHS = 20 # Number of training epochs
|
||||||
|
|
||||||
# Step 1: Data Preparation
|
# Step 1: Data Preparation
|
||||||
TRAIN_VIDEO_FILE = 'native_video.mkv' # The training video file name
|
TRAIN_VIDEO_FILE = 'test_data/native_video.mkv' # The training video file name
|
||||||
VAL_VIDEO_FILE = 'training_video.mkv' # The validation 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
|
TRAIN_SAMPLES = 2 # Number of video frames used for training
|
||||||
VAL_SAMPLES = 2 # Number of video frames used for validation
|
VAL_SAMPLES = 2 # Number of video frames used for validation
|
||||||
|
|
||||||
|
@ -77,5 +77,5 @@ model.fit(
|
||||||
print("\nTraining completed.")
|
print("\nTraining completed.")
|
||||||
|
|
||||||
# Step 3: Save the trained model
|
# Step 3: Save the trained model
|
||||||
model.save('ai_rate_control_model.keras')
|
model.save('models/model.keras')
|
||||||
print("Model saved successfully!")
|
print("Model saved successfully!")
|
||||||
|
|
Reference in a new issue