Skip to content

Commit

Permalink
Merge pull request Trusted-AI#2424 from Trusted-AI/dependabot/pip/pil…
Browse files Browse the repository at this point in the history
…low-10.3.0

Bump pillow from 10.2.0 to 10.3.0
  • Loading branch information
beat-buesser authored Apr 4, 2024
2 parents b41b6e3 + 6d3f575 commit 17db91c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions art/estimators/object_tracking/pytorch_goturn.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,11 +743,12 @@ def compute_loss(

return output

def init(self, image: "PIL.JpegImagePlugin.JpegImageFile", box: np.ndarray):
def init(self, image: "PIL.JpegImagePlugin.JpegImageFile", box: np.ndarray): # type: ignore
"""
Method `init` for GOT-10k trackers.
:param image: Current image.
:param box: Initial boxes.
:return: Predicted box.
"""
import torch
Expand All @@ -766,7 +767,7 @@ def update(self, image: np.ndarray) -> np.ndarray:
"""
import torch

curr = torch.from_numpy(np.array(image) / 255.0)
curr = torch.from_numpy(image / 255.0)
if self.clip_values is not None:
curr = curr * self.clip_values[1]
curr = curr.to(self.device)
Expand Down Expand Up @@ -809,7 +810,7 @@ def track(self, img_files: List[str], box: np.ndarray, visualize: bool = False)
if i_f == 0:
self.init(image, box)
else:
boxes[i_f, :] = self.update(image)
boxes[i_f, :] = self.update(np.array(image))
times[i_f] = time.time() - start_time

if visualize:
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ scipy==1.10.1
matplotlib==3.7.1
scikit-learn==1.4.1.post1
six==1.16.0
Pillow==10.2.0
Pillow==10.3.0
tqdm==4.66.1
statsmodels==0.14.1
pydub==0.25.1
Expand Down

0 comments on commit 17db91c

Please sign in to comment.