Skip to content

Commit fa149fb

Browse files
committed
update requirements and fix fromarray to work with new PIL
1 parent fecc427 commit fa149fb

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

trainer/requirements.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
scikit-image==0.23.2
2-
numpy==1.26.4
3-
imagecodecs==2024.1.1
4-
scipy==1.13.0
5-
Pillow==10.3.0
6-
torch==2.3.0
7-
torchvision==0.18.0
8-
pytest==8.2.0
1+
imagecodecs==2025.8.2
2+
numpy==2.3.4
3+
pytest==8.4.2
4+
scikit-image==0.25.2
5+
scipy==1.16.2
6+
pillow==12.0.0
7+

trainer/src/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def color_jit_transform(self, photo, annot):
8080
# TODO check skimage docs for something cleaner to convert
8181
# from float to int
8282
photo = rescale_intensity(photo, out_range=(0, 255))
83-
photo = Image.fromarray((photo).astype(np.int8), mode='RGB')
83+
photo = Image.fromarray((photo).astype(np.uint8), mode='RGB')
8484
photo = self.color_jit(photo) # returns PIL image
8585
photo = img_as_float32(np.array(photo)) # return back to numpy
8686
return photo, annot

0 commit comments

Comments
 (0)