Skip to content

Commit 01b700e

Browse files
committed
cv2 numpy array input support
1 parent ed35316 commit 01b700e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roboflow/core/workspace.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import requests
77
from PIL import Image
8+
from numpy import ndarray
89

910
from roboflow.config import API_URL, CLIP_FEATURIZE_URL, DEMO_KEYS
1011
from roboflow.core.project import Project
@@ -292,7 +293,11 @@ def active_learning(
292293
print("inference reference point: ", inference_model)
293294
print("upload destination: ", upload_project)
294295

295-
globbed_files = glob.glob(raw_data_location + "/*" + raw_data_extension)
296+
# check if raw data type is cv2 frame
297+
if type(raw_data_location is type(ndarray)):
298+
globbed_files = [raw_data_location]
299+
else:
300+
globbed_files = glob.glob(raw_data_location + "/*" + raw_data_extension)
296301

297302
image1 = globbed_files[0]
298303
similarity_timeout_counter = 0

0 commit comments

Comments
 (0)