Spaces:
Sleeping
Sleeping
Commit
·
8df18fa
1
Parent(s):
525566c
change folder to save img
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def detect_img(img,model):
|
|
49 |
|
50 |
# save the upload image to Inference
|
51 |
current_image_name = "current_img.jpg"
|
52 |
-
save_current_path = os.path.join("Inference/images", current_image_name)
|
53 |
img = np.array(img)
|
54 |
img = img[:,:,::-1] #convert color because np change it to bgr
|
55 |
cv2.imwrite(save_current_path, img)
|
@@ -226,7 +226,7 @@ def detect_vid(vid,model):
|
|
226 |
|
227 |
# save the upload video to Inference
|
228 |
current_video_name = "current_vid.mp4"
|
229 |
-
save_current_path = os.path.join("Inference/videos", current_video_name)
|
230 |
|
231 |
frames = cv2.VideoCapture(vid)
|
232 |
fps = frames.get(cv2.CAP_PROP_FPS)
|
|
|
49 |
|
50 |
# save the upload image to Inference
|
51 |
current_image_name = "current_img.jpg"
|
52 |
+
save_current_path = os.path.join("./Inference/images", current_image_name)
|
53 |
img = np.array(img)
|
54 |
img = img[:,:,::-1] #convert color because np change it to bgr
|
55 |
cv2.imwrite(save_current_path, img)
|
|
|
226 |
|
227 |
# save the upload video to Inference
|
228 |
current_video_name = "current_vid.mp4"
|
229 |
+
save_current_path = os.path.join("./Inference/videos", current_video_name)
|
230 |
|
231 |
frames = cv2.VideoCapture(vid)
|
232 |
fps = frames.get(cv2.CAP_PROP_FPS)
|