Browse Source
        
      
      rm _types
      
        Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
      
      
        main
      
      
     
    
    
    
	
		
			
				 1 changed files with 
2 additions and 
2 deletions
			 
			
		 
		
			
				- 
					
					
					 
					mpvit.py
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -54,7 +54,7 @@ class MPViT(NNOperator): | 
			
		
	
		
			
				
					|  |  |  |         self.skip_tfms = skip_preprocess | 
			
		
	
		
			
				
					|  |  |  |         self.device = device | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     def __call__(self, data: Union[List[towhee._types.Image], towhee._types.Image]): | 
			
		
	
		
			
				
					|  |  |  |     def __call__(self, data: Union[List['towhee.types.Image'], 'towhee.types.Image']): | 
			
		
	
		
			
				
					|  |  |  |         if not isinstance(data, list): | 
			
		
	
		
			
				
					|  |  |  |             imgs = [data] | 
			
		
	
		
			
				
					|  |  |  |         else: | 
			
		
	
	
		
			
				
					|  |  | @ -77,6 +77,6 @@ class MPViT(NNOperator): | 
			
		
	
		
			
				
					|  |  |  |         return vecs | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @arg(1, to_image_color('RGB')) | 
			
		
	
		
			
				
					|  |  |  |     def convert_img(self, img: towhee._types.Image): | 
			
		
	
		
			
				
					|  |  |  |     def convert_img(self, img: 'towhee.types.Image'): | 
			
		
	
		
			
				
					|  |  |  |         img = PILImage.fromarray(img.astype('uint8'), 'RGB') | 
			
		
	
		
			
				
					|  |  |  |         return img | 
			
		
	
	
		
			
				
					|  |  | 
 |