Skip to content

Commit 7a03b3c

Browse files
authored
Merge branch 'main' into dependabot/github_actions/codecov/codecov-action-4
2 parents bcf0c89 + 9ed6105 commit 7a03b3c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
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: 3 additions & 3 deletions
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
@@ -46,7 +46,7 @@ xgboost==2.0.3
4646
kornia~=0.7.1
4747
tensorboardX==2.6.2.2
4848
lief==0.14.1
49-
jax[cpu]==0.4.23
49+
jax[cpu]==0.4.26
5050

5151
# Lingvo ASR dependencies
5252
# supported versions: (lingvo==0.6.4 with tensorflow-gpu==2.1.0)
@@ -58,7 +58,7 @@ jax[cpu]==0.4.23
5858
pytest~=7.4.3
5959
pytest-flake8~=1.1.1
6060
flake8~=4.0.1
61-
pytest-mock~=3.12.0
61+
pytest-mock~=3.14.0
6262
pytest-cov~=4.1.0
6363
requests~=2.31.0
6464

0 commit comments

Comments
 (0)