eusholli commited on
Commit
c82ab41
1 Parent(s): 7c46b79

convert movie frames to RGB format

Browse files
Files changed (2) hide show
  1. .gitignore +3 -0
  2. app.py +5 -5
.gitignore CHANGED
@@ -123,3 +123,6 @@ yolov8n.pt
123
  # Keep empty models dir
124
  models/*
125
  !models/.gitkeep
 
 
 
 
123
  # Keep empty models dir
124
  models/*
125
  !models/.gitkeep
126
+
127
+ # All cached movie files
128
+ *.mp4
app.py CHANGED
@@ -314,11 +314,11 @@ def process_video(video_path):
314
  if not ret:
315
  break # Exit the loop if no more frames are available
316
 
317
- # Display the current frame as the input frame
318
- input_placeholder.image(frame)
319
- analyze_frame(
320
- frame
321
- ) # Analyze the frame for face detection and sentiment analysis
322
  publish_frame() # Publish the results
323
 
324
  cap.release() # Release the video capture object
 
314
  if not ret:
315
  break # Exit the loop if no more frames are available
316
 
317
+ # Convert the frame from BGR to RGB format
318
+ rgb_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
319
+
320
+ # Analyze the frame for face detection and sentiment analysis
321
+ analyze_frame(rgb_frame)
322
  publish_frame() # Publish the results
323
 
324
  cap.release() # Release the video capture object