modify the event pickle file

This commit is contained in:
18262620154
2024-07-28 19:21:27 +08:00
parent f14faa323e
commit 0ccfd0151f
152 changed files with 57 additions and 27 deletions

View File

@ -300,7 +300,7 @@ class LoadImages:
ret_val, im0 = self.cap.read()
self.frame += 1
# im0 = self._cv2_rotate(im0) # for use if cv2 autorotation is False
im0 = self._cv2_rotate(im0) # for use if cv2 autorotation is False
s = f'video {self.count + 1}/{self.nf} ({self.frame}/{self.frames}) {path}: '
else:
@ -329,12 +329,15 @@ 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:
# 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)
elif self.orientation == 90:
return cv2.rotate(im, cv2.ROTATE_180)
return im
def __len__(self):