Browse Source
        
      
      update readme
      
        Signed-off-by: junjiejiangjjj <junjie.jiang@zilliz.com>
      
      
        main
      
      
     
    
    
    
	
		
			
				 1 changed files with 
8 additions and 
16 deletions
			 
			
		 
		
			
				- 
					
					
					 
					README.md
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				| 
					
					
						
							
						
					
					
				 | 
				@ -25,26 +25,18 @@ Load a image from path './dog.jpg'. | 
			
		
		
	
		
			
				 | 
				 | 
				 *Write the pipeline in simplified style:* | 
				 | 
				 | 
				 *Write the pipeline in simplified style:* | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				```python | 
				 | 
				 | 
				```python | 
			
		
		
	
		
			
				 | 
				 | 
				import towhee | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				from towhee.dc2 import pipe, ops, DataCollection | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				towhee.glob('./dog.jpg') \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .image_decode.cv2() \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .show() | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				``` | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				*Write a same pipeline with explicit inputs/outputs name specifications:* | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				```python | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				import towhee | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				p = ( | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				  pipe.input('url') | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				  .map('url', 'image', ops.image_decode.cv2()) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				  .output('image') | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				) | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				towhee.glob['path']('./dog.jpg') \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .image_decode.cv2['path', 'img']() \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .select['img']() \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .show() | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				DataCollection(p('./dog.jpg')).show() | 
			
		
		
	
		
			
				 | 
				 | 
				``` | 
				 | 
				 | 
				``` | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				<img src="./show_result.jpg" height="150px"/> | 
				 | 
				 | 
				<img src="./show_result.jpg" height="150px"/> | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -75,7 +67,7 @@ An image decode operator takes an image path as input. It decodes the image back | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				**img**: *str* | 
				 | 
				 | 
				**img**: *str* | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
					Image file path. | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					Local file path or http url. | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |