Browse Source
        
      
      update the readme.
      
        Signed-off-by: wxywb <xy.wang@zilliz.com>
      
      
        main
      
      
     
    
      
        
          
            
            wxywb
          
          3 years ago
          
         
        
        
       
      
     
    
    
	
		
			
				 1 changed files with 
9 additions and 
17 deletions
			 
			
		 
		
			
				- 
					
					
					 
					README.md
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				| 
					
					
						
							
						
					
					
				 | 
				@ -19,27 +19,19 @@ | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				Extract facial landmarks from './img1.jpg'.  | 
				 | 
				 | 
				Extract facial landmarks from './img1.jpg'.  | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				*Write the pipeline in simplified style:* | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				*Write a pipeline with explicit inputs/outputs name specifications:* | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				```python | 
				 | 
				 | 
				```python | 
			
		
		
	
		
			
				 | 
				 | 
				import towhee | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				from towhee.dc2 import pipe, ops, DataCollection | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				towhee.glob('./img1.jpg') \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .image_decode.cv2() \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .face_landmark_detection.mobilefacenet() \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .to_list() | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				``` | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				*Write a same pipeline with explicit inputs/outputs name specifications:* | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				```python | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				import towhee | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				p = ( | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				    pipe.input('path') | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        .map('path', 'img', ops.image_decode()) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        .map('img', 'landmark', ops.face_landmark_detection.mobilefacenet()) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        .output('img', 'landmark') | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				) | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				towhee.glob['path']('./img1.jpg') \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .image_decode.cv2['path', 'img']() \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .face_landmark_detection.mobilefacenet['img', 'landmark']() \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .select['img','landmark']() \ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  .show() | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				DataCollection(p('./img1.jpg')).show() | 
			
		
		
	
		
			
				 | 
				 | 
				``` | 
				 | 
				 | 
				``` | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				<img src="https://towhee.io/face-landmark-detection/mobilefacenet/raw/branch/main/result.png" alt="result1" style="height:20px;"/> | 
				 | 
				 | 
				<img src="https://towhee.io/face-landmark-detection/mobilefacenet/raw/branch/main/result.png" alt="result1" style="height:20px;"/> | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |