Skip to content

Commit 17db91c

Browse files
authored
Merge pull request #2424 from Trusted-AI/dependabot/pip/pillow-10.3.0
Bump pillow from 10.2.0 to 10.3.0
2 parents b41b6e3 + 6d3f575 commit 17db91c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

art/estimators/object_tracking/pytorch_goturn.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,11 +743,12 @@ def compute_loss(
743743

744744
return output
745745

746-
def init(self, image: "PIL.JpegImagePlugin.JpegImageFile", box: np.ndarray):
746+
def init(self, image: "PIL.JpegImagePlugin.JpegImageFile", box: np.ndarray): # type: ignore
747747
"""
748748
Method `init` for GOT-10k trackers.
749749
750750
:param image: Current image.
751+
:param box: Initial boxes.
751752
:return: Predicted box.
752753
"""
753754
import torch
@@ -766,7 +767,7 @@ def update(self, image: np.ndarray) -> np.ndarray:
766767
"""
767768
import torch
768769

769-
curr = torch.from_numpy(np.array(image) / 255.0)
770+
curr = torch.from_numpy(image / 255.0)
770771
if self.clip_values is not None:
771772
curr = curr * self.clip_values[1]
772773
curr = curr.to(self.device)
@@ -809,7 +810,7 @@ def track(self, img_files: List[str], box: np.ndarray, visualize: bool = False)
809810
if i_f == 0:
810811
self.init(image, box)
811812
else:
812-
boxes[i_f, :] = self.update(image)
813+
boxes[i_f, :] = self.update(np.array(image))
813814
times[i_f] = time.time() - start_time
814815

815816
if visualize:

requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ scipy==1.10.1
55
matplotlib==3.7.1
66
scikit-learn==1.4.1.post1
77
six==1.16.0
8-
Pillow==10.2.0
8+
Pillow==10.3.0
99
tqdm==4.66.1
1010
statsmodels==0.14.1
1111
pydub==0.25.1

0 commit comments

Comments
 (0)