mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	OpenVino - Error clarification for compile_model function (#12304)
* Error clarification for openvino's compile_model function * run ruff format --------- Co-authored-by: ubawurinna <you@example.com>
This commit is contained in:
		
							parent
							
								
									a0741aa7b1
								
							
						
					
					
						commit
						2ea1d34f4f
					
				@ -1,4 +1,5 @@
 | 
				
			|||||||
import logging
 | 
					import logging
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import numpy as np
 | 
					import numpy as np
 | 
				
			||||||
import openvino as ov
 | 
					import openvino as ov
 | 
				
			||||||
@ -35,6 +36,10 @@ class OvDetector(DetectionApi):
 | 
				
			|||||||
            )
 | 
					            )
 | 
				
			||||||
            detector_config.device = "GPU"
 | 
					            detector_config.device = "GPU"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if not os.path.isfile(detector_config.model.path):
 | 
				
			||||||
 | 
					            logger.error(f"OpenVino model file {detector_config.model.path} not found.")
 | 
				
			||||||
 | 
					            raise FileNotFoundError
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.interpreter = self.ov_core.compile_model(
 | 
					        self.interpreter = self.ov_core.compile_model(
 | 
				
			||||||
            model=detector_config.model.path, device_name=detector_config.device
 | 
					            model=detector_config.model.path, device_name=detector_config.device
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user