@@ -503,12 +503,14 @@ class PatchExtractor(TransformerMixin, BaseEstimator):
503
503
Parameters
504
504
----------
505
505
patch_size : tuple of int (patch_height, patch_width), default=None
506
- The dimensions of one patch.
506
+ The dimensions of one patch. If set to None, the patch size will be
507
+ automatically set to `(img_height // 10, img_width // 10)`, where
508
+ `img_height` and `img_width` are the dimensions of the input images.
507
509
508
510
max_patches : int or float, default=None
509
511
The maximum number of patches per image to extract. If `max_patches` is
510
512
a float in (0, 1), it is taken to mean a proportion of the total number
511
- of patches.
513
+ of patches. If set to None, extract all possible patches.
512
514
513
515
random_state : int, RandomState instance, default=None
514
516
Determines the random number generator used for random sampling when
@@ -618,8 +620,8 @@ def transform(self, X):
618
620
else :
619
621
if len (self .patch_size ) != 2 :
620
622
raise ValueError (
621
- f "patch_size must be a tuple of two integers. Got { self . patch_size } "
622
- " instead."
623
+ "patch_size must be a tuple of two integers. Got"
624
+ f" { self . patch_size } instead."
623
625
)
624
626
patch_size = self .patch_size
625
627
0 commit comments