fix: is_empty check for filtering
This commit is contained in:
1 parent
6889e33da5
commit
28fa054fdc
1 file changed
+2
@@ -1203,6 +1203,8 @@ class Detections:
|
||||
return self.data.get(index)
|
||||
if isinstance(index, int):
|
||||
index = [index]
|
||||
if self.is_empty():
|
||||
return Detections.empty()
|
||||
return Detections(
|
||||
xyxy=self.xyxy[index],
|
||||
mask=self.mask[index] if self.mask is not None else None,
|
||||
|
||||
Reference in new issue
Block a user