Spaces:
				
			
			
	
			
			
		Configuration error
		
	
	
	
			
			
	
	
	
	
		
		
		Configuration error
		
	Update app_recon.py
Browse files- app_recon.py +2 -1
 
    	
        app_recon.py
    CHANGED
    
    | 
         @@ -108,6 +108,7 @@ def sam_init(): 
     | 
|
| 108 | 
         | 
| 109 | 
         
             
            sam_predictor = sam_init()
         
     | 
| 110 | 
         | 
| 
         | 
|
| 111 | 
         
             
            def sam_segment(predictor, input_image, *bbox_coords):
         
     | 
| 112 | 
         
             
                bbox = np.array(bbox_coords)
         
     | 
| 113 | 
         
             
                image = np.asarray(input_image)
         
     | 
| 
         @@ -174,7 +175,7 @@ def depth_normal(img_path, 
     | 
|
| 174 | 
         | 
| 175 | 
         
             
                return depth_colored, normal_colored, [depth_path, normal_path]
         
     | 
| 176 | 
         | 
| 177 | 
         
            -
             
     | 
| 178 | 
         
             
            def seg_foreground(image_file):
         
     | 
| 179 | 
         
             
                img = Image.open(image_file)
         
     | 
| 180 | 
         | 
| 
         | 
|
| 108 | 
         | 
| 109 | 
         
             
            sam_predictor = sam_init()
         
     | 
| 110 | 
         | 
| 111 | 
         
            +
            @spaces.GPU
         
     | 
| 112 | 
         
             
            def sam_segment(predictor, input_image, *bbox_coords):
         
     | 
| 113 | 
         
             
                bbox = np.array(bbox_coords)
         
     | 
| 114 | 
         
             
                image = np.asarray(input_image)
         
     | 
| 
         | 
|
| 175 | 
         | 
| 176 | 
         
             
                return depth_colored, normal_colored, [depth_path, normal_path]
         
     | 
| 177 | 
         | 
| 178 | 
         
            +
            @spaces.GPU
         
     | 
| 179 | 
         
             
            def seg_foreground(image_file):
         
     | 
| 180 | 
         
             
                img = Image.open(image_file)
         
     | 
| 181 | 
         |