mirror of
				https://github.com/qurator-spk/sbb_textline_detection.git
				synced 2025-10-31 01:14:17 +01:00 
			
		
		
		
	🧹 sbb_textline_detector: Delete textline session/model after using it
This commit is contained in:
		
							parent
							
								
									9b2c415125
								
							
						
					
					
						commit
						5d440857e7
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -683,6 +683,12 @@ class textlineerkenner: | ||||||
| 
 | 
 | ||||||
|             y_predi = mask_true |             y_predi = mask_true | ||||||
|             y_predi = cv2.resize(y_predi, (img_org.shape[1], img_org.shape[0]), interpolation=cv2.INTER_NEAREST) |             y_predi = cv2.resize(y_predi, (img_org.shape[1], img_org.shape[0]), interpolation=cv2.INTER_NEAREST) | ||||||
|  | 
 | ||||||
|  |         session_textline.close() | ||||||
|  | 
 | ||||||
|  |         del model_textline | ||||||
|  |         del session_textline | ||||||
|  |         gc.collect() | ||||||
|         return y_predi |         return y_predi | ||||||
| 
 | 
 | ||||||
|     def get_textlines_for_each_textregions(self, textline_mask_tot, boxes): |     def get_textlines_for_each_textregions(self, textline_mask_tot, boxes): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue