File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import json
2
2
from pathlib import Path
3
- from typing import Callable , Optional
3
+ from typing import Any , Tuple , Callable , Optional
4
4
5
5
import PIL .Image
6
6
@@ -63,7 +63,7 @@ def __init__(
63
63
def __len__ (self ) -> int :
64
64
return len (self ._image_files )
65
65
66
- def __getitem__ (self , idx ) -> Tuple [PIL . Image . Image , int ]:
66
+ def __getitem__ (self , idx ) -> Tuple [Any , Any ]:
67
67
image_file , label = self ._image_files [idx ], self ._labels [idx ]
68
68
image = PIL .Image .open (image_file ).convert ("RGB" )
69
69
@@ -103,4 +103,4 @@ def _check_exists(self) -> bool:
103
103
def _download (self ) -> None :
104
104
if self ._check_exists ():
105
105
return
106
- download_and_extract_archive (self ._URL , download_root = self ._base_folder , md5 = self ._MD5 )
106
+ download_and_extract_archive (self ._URL , download_root = str ( self ._base_folder ) , md5 = self ._MD5 )
You can’t perform that action at this time.
0 commit comments