marcotam commited on
Commit
7102372
·
1 Parent(s): 0c15d43

Upload webapp.py

Browse files
Files changed (1) hide show
  1. webapp.py +2 -1
webapp.py CHANGED
@@ -133,7 +133,8 @@ def main():
133
  frame_buffer = st.camera_input("Take a picture")
134
 
135
  if frame_buffer is not None:
136
- frame = frame_buffer.getvalue()
 
137
  result, process_this_frame, face_locations, faces, face_names, score = demo.process_frame(frame, process_this_frame, face_locations, faces, face_names, score)
138
  # Display the resulting image
139
  FRAME_WINDOW.image(result)
 
133
  frame_buffer = st.camera_input("Take a picture")
134
 
135
  if frame_buffer is not None:
136
+ bytes_data = frame_buffer.getvalue()
137
+ frame = cv2.imdecode(np.frombuffer(bytes_data, np.uint8), cv2.IMREAD_COLOR)
138
  result, process_this_frame, face_locations, faces, face_names, score = demo.process_frame(frame, process_this_frame, face_locations, faces, face_names, score)
139
  # Display the resulting image
140
  FRAME_WINDOW.image(result)