mirror of
				https://github.com/qurator-spk/sbb_binarization.git
				synced 2025-10-31 01:24:14 +01:00 
			
		
		
		
	reintroduce TF stderr / log silencer
This commit is contained in:
		
							parent
							
								
									9ef8259677
								
							
						
					
					
						commit
						cade5dda73
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		|  | @ -3,15 +3,22 @@ import gc | ||||||
| import itertools | import itertools | ||||||
| import math | import math | ||||||
| import os | import os | ||||||
|  | import sys | ||||||
| from pathlib import Path | from pathlib import Path | ||||||
| from typing import Union, List, Any | from typing import Union, List, Any | ||||||
| 
 | 
 | ||||||
| import cv2 | import cv2 | ||||||
| import numpy as np | import numpy as np | ||||||
|  | 
 | ||||||
|  | os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' | ||||||
|  | stderr = sys.stderr | ||||||
|  | sys.stderr = open(os.devnull, 'w') | ||||||
| import tensorflow as tf | import tensorflow as tf | ||||||
|  | from tensorflow.python.keras.saving.save import load_model | ||||||
|  | sys.stderr = stderr | ||||||
|  | 
 | ||||||
| from mpire import WorkerPool | from mpire import WorkerPool | ||||||
| from mpire.utils import make_single_arguments | from mpire.utils import make_single_arguments | ||||||
| from tensorflow.python.keras.saving.save import load_model |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class SbbBinarizer: | class SbbBinarizer: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue