Update model to inswapper_128_fp16

Faster as claimed. Also adjusted the size of the preview to a smaller size. You should see a significant improvement on this
This commit is contained in:
Kenneth Estanislao
2023-10-03 23:38:17 +08:00
parent 04adada813
commit 16712476a9
4 changed files with 8 additions and 7 deletions

View File

@@ -257,11 +257,11 @@ def webcam_preview():
global preview_label, PREVIEW
cap = cv2.VideoCapture(0) # Use index for the webcam (adjust the index accordingly if necessary)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280) # Set the width of the resolution
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 720) # Set the height of the resolution
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640) # Set the width of the resolution
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) # Set the height of the resolution
cap.set(cv2.CAP_PROP_FPS, 60) # Set the frame rate of the webcam
PREVIEW_MAX_HEIGHT = 720
PREVIEW_MAX_WIDTH = 1280
PREVIEW_MAX_WIDTH = 640
PREVIEW_MAX_HEIGHT = 480
preview_label.configure(image=None) # Reset the preview image before startup