add yolo v10 and modify pipeline
This commit is contained in:
@ -300,7 +300,9 @@ class LoadImages:
|
||||
ret_val, im0 = self.cap.read()
|
||||
|
||||
self.frame += 1
|
||||
im0 = self._cv2_rotate(im0) # for use if cv2 autorotation is False
|
||||
|
||||
# if self.orientation == 270:
|
||||
# im0 = cv2.rotate(im0, cv2.ROTATE_90_COUNTERCLOCKWISE) # for use if cv2 autorotation is False
|
||||
s = f'video {self.count + 1}/{self.nf} ({self.frame}/{self.frames}) {path}: '
|
||||
|
||||
else:
|
||||
@ -329,14 +331,14 @@ class LoadImages:
|
||||
|
||||
def _cv2_rotate(self, im):
|
||||
# Rotate a cv2 video manually
|
||||
# if self.orientation == 0:
|
||||
# return cv2.rotate(im, cv2.ROTATE_90_CLOCKWISE)
|
||||
# elif self.orientation == 180:
|
||||
# return cv2.rotate(im, cv2.ROTATE_90_COUNTERCLOCKWISE)
|
||||
# elif self.orientation == 90:
|
||||
# return cv2.rotate(im, cv2.ROTATE_180)
|
||||
if self.orientation == 270:
|
||||
if self.orientation == 0:
|
||||
return cv2.rotate(im, cv2.ROTATE_90_CLOCKWISE)
|
||||
elif self.orientation == 180:
|
||||
return cv2.rotate(im, cv2.ROTATE_90_COUNTERCLOCKWISE)
|
||||
elif self.orientation == 90:
|
||||
return cv2.rotate(im, cv2.ROTATE_180)
|
||||
# if self.orientation == 270:
|
||||
# return cv2.rotate(im, cv2.ROTATE_90_COUNTERCLOCKWISE)
|
||||
|
||||
return im
|
||||
|
||||
|
Reference in New Issue
Block a user