class_docstr: Inherits from Hashing base class and implements average hashing. (Implementation reference:
  http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html)
  
  Offers all the functionality mentioned in hashing class.
  
  Example:
  ```
  # Average hash for images
  from imagededup.methods import AHash
  ahasher = AHash()
  average_hash = ahasher.encode_image(image_file = 'path/to/image.jpg')
  OR
  average_hash = ahasher.encode_image(image_array = <numpy image array>)
  OR
  average_hashes = ahasher.encode_images(image_dir = 'path/to/directory')  # for a directory of images
  
  # Finding duplicates:
  from imagededup.methods import AHash
  ahasher = AHash()
  duplicates = ahasher.find_duplicates(image_dir='path/to/directory', max_distance_threshold=15, scores=True)
  OR
  duplicates = ahasher.find_duplicates(encoding_map=encoding_map, max_distance_threshold=15, scores=True)
  
  # Finding duplicates to return a single list of duplicates in the image collection
  from imagededup.methods import AHash
  ahasher = AHash()
  files_to_remove = ahasher.find_duplicates_to_remove(image_dir='path/to/images/directory',
                    max_distance_threshold=15)
  OR
  files_to_remove = ahasher.find_duplicates_to_remove(encoding_map=encoding_map, max_distance_threshold=15)
  ```
docstr: Initialize average hashing class.
  
  Args:
      verbose: Display progress bar if True else disable it. Default value is True.
docstr_tok: ["Initialize","average","hashing","class",".","Args",":","verbose",":","Display","progress","bar","if","True","else","disable","it",".","Default","value","is","True","."]
code: def __init__(self, verbose: bool = True) -> None:
      """
      Initialize average hashing class.
  
      Args:
          verbose: Display progress bar if True else disable it. Default value is True.
      """
      super().__init__(verbose)
      self.target_size = (8, 8)
  
imports: import os
  import sys
  import warnings
  from pathlib import PurePath, Path
  from typing import Dict, List, Optional
  from multiprocessing import cpu_count
  import numpy
  import pywt
  from scipy.fftpack import dct
  from imagededup.handlers.search.retrieval import HashEval
  from imagededup.utils.general_utils import get_files_to_remove, save_json, parallelise, generate_files, generate_relative_names
  from imagededup.utils.image_utils import load_image, preprocess_image, check_image_array_hash
  from imagededup.utils.logger import return_logger
label_desc: Use image node_id 1 to create a new AHash object from inherited base classes: Hashing with example: obj = AHash(verbose)