o
    e	                     @   s@   d Z ddlZG dd deZG dd deZdd Zd	d
 ZdS )zBase classes and functions used by all/most augmenters.

This module is planned to contain :class:`imgaug.augmenters.meta.Augmenter`
in the future.

Added in 0.4.0.

    Nc                   @      e Zd ZdZdS ) SuspiciousMultiImageShapeWarningz9Warning multi-image inputs that look like a single image.N__name__
__module____qualname____doc__ r	   r	   FD:\Projects\ConvertPro\env\Lib\site-packages\imgaug/augmenters/base.pyr          r   c                   @   r   )!SuspiciousSingleImageShapeWarningz?Warning for single-image inputs that look like multiple images.Nr   r	   r	   r	   r
   r      r   r   c                 C   sT   | d u rd S t | r$| jdkr&| jd dv r(t jd| jf td d S d S d S d S )N   )   r   a  You provided a numpy array of shape %s as a multi-image augmentation input, which was interpreted as (N, H, W). The last dimension however has value 1 or 3, which indicates that you provided a single image with shape (H, W, C) instead. If that is the case, you should use e.g. augmenter(image=<your input>) or augment_image(<your input>) -- note the singular 'image' instead of 'imageS'. Otherwise your single input image will be interpreted as multiple images of shape (H, W) during augmentation.category)iaZis_np_arrayndimshapewarnr   )Zimagesr	   r	   r
   &_warn_on_suspicious_multi_image_shapes   s   
	

r   c                 C   s\   | d u rd S | j dkr(| jd dkr*| jdd dkr,tjd| jf td d S d S d S d S )	Nr   r       r      )r   r   a  You provided a numpy array of shape %s as a single-image augmentation input, which was interpreted as (H, W, C). The last dimension however has a size of >=32, which indicates that you provided a multi-image array with shape (N, H, W) instead. If that is the case, you should use e.g. augmenter(imageS=<your input>) or augment_imageS(<your input>). Otherwise your multi-image input will be interpreted as a single image during augmentation.r   )r   r   r   r   r   )imager	   r	   r
   &_warn_on_suspicious_single_image_shape)   s   *	
r   )r   Zimgaugr   UserWarningr   r   r   r   r	   r	   r	   r
   <module>   s    