+
    Ci8	                     d    ^ RI t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt	 ^RI
Ht  ! R R]4      tR# )    N)List)Image)BaseSessionc                   V   a  ] tR t^t o RtV 3R lR lt]R 4       t]R 4       tRt	V t
R# )
DisSessionz7
This class represents a session for object detection.
c                6   < V ^8  d   QhRS[ RS[S[ ,          /# )   imgreturn)PILImager   )format__classdict__s   "V/var/www/html/photoedit/myenv/lib/python3.14/site-packages/rembg/sessions/dis_anime.py__annotate__DisSession.__annotate__   s      8 h     c           	        V P                   P                  RV P                  VRRR4      4      pV^ ,          R,          p\        P                  ! V4      p\        P
                  ! V4      pWW,
          Wg,
          ,          p\        P                  ! V4      p\        P                  ! V^,          P                  R4      RR7      pVP                  VP                  \        P                  P                  4      pV.# )	a	  
Use a pre-trained model to predict the object in the given image.

Parameters:
    img (PILImage): The input image.
    *args: Variable length argument list.
    **kwargs: Arbitrary keyword arguments.

Returns:
    List[PILImage]: A list of predicted mask images.
Nuint8L)mode)g
ףp=
?gv/?gCl?)      ?r   r   )   r   )NNNr   r   r   )inner_sessionrun	normalizenpmaxminsqueezer   	fromarrayastyperesizesize
ResamplingLANCZOS)	selfr
   argskwargsort_outspredmamimasks	   &&*,     r   predictDisSession.predict   s     %%))NN3 5U

 {:&VVD\VVD\	bg&zz$s
227;#F{{388U%5%5%=%=>vr   c           
        V P                   ! V/ VB  R2p\        P                  ! RV P                  ! V/ VB '       d   RMRVV P                  ! V/ VB RR7       \
        P                  P                  V P                  ! V/ VB V4      # )z
Download the pre-trained models.

Parameters:
    *args: Variable length argument list.
    **kwargs: Arbitrary keyword arguments.

Returns:
    str: The path of the downloaded model file.
z.onnxzNhttps://github.com/danielgatis/rembg/releases/download/v0.0.0/isnet-anime.onnxNz$md5:6f184e756bb3bd901c8849220a83e38eT)fnamepathprogressbar)namepoochretrievechecksum_disabled
u2net_homeosr3   join)clsr(   r)   r2   s   &*, r   download_modelsDisSession.download_models/   s     88T,V,-U3\ (($9&99 ;00
	
 ww||CNND;F;UCCr   c                    R# )z
Get the name of the pre-trained model.

Parameters:
    *args: Variable length argument list.
    **kwargs: Arbitrary keyword arguments.

Returns:
    str: The name of the pre-trained model.
zisnet-anime )r<   r(   r)   s   &*,r   r5   DisSession.nameJ   s     r   r@   N)__name__
__module____qualname____firstlineno____doc__r/   classmethodr=   r5   __static_attributes____classdictcell__)r   s   @r   r   r      s>      < D D4  r   r   )r:   typingr   numpyr   r6   PILr   	PIL.Imager   baser   r   r@   r   r   <module>rO      s(    	     ' J Jr   