class_docstr: ```
  predicts image classes
  ```
class_docstr_tok: ["``","`","predicts","image","classes","``","`"]
docstr: ```
  Predicts the classes of all images in a folder.
  If return_proba is True, returns probabilities of each class.
  ```
docstr_tok: ["``","`","Predicts","the","classes","of","all","images","in","a","folder",".","If","return_proba","is","True",",","returns","probabilities","of","each","class",".","``","`"]
code: def predict_folder(self, folder, return_proba=False, verbose=0):
      """
      ```
      Predicts the classes of all images in a folder.
      If return_proba is True, returns probabilities of each class.
      ```
  
      """
      if not os.path.isdir(folder):
          raise ValueError("folder must be valid directory")
      (generator, steps) = self.preproc.preprocess(
          folder, batch_size=self.batch_size
      )
      result = self.predict_generator(
          generator,
          steps=steps,
          return_proba=return_proba,
          verbose=verbose,
      )
      if len(result) != len(generator.filenames):
          raise Exception(
              "number of results does not equal number of filenames"
          )
      return list(zip(generator.filenames, result))
  
file_path: ktrain/ktrain/vision/predictor.py
imports: from ..None import utils
  from ..imports import *
  from ..predictor import Predictor
  from .preprocessor import ImagePreprocessor
label_desc: Use image node_id 6 for calling the ImagePredictor obj's underlying member method code with example usage: obj.predict_folder(folder, return_proba, verbose) and returns: list