|  | @ -25,11 +25,11 @@ class Core(QThread): | 
		
	
		
			
				|  |  |     newFrame = pyqtSignal(object, int, bool,ctypes.c_int64) |  |  |     newFrame = pyqtSignal(object, int, bool,ctypes.c_int64) | 
		
	
		
			
				|  |  |     coordsUpdated = pyqtSignal(int, object, bool) |  |  |     coordsUpdated = pyqtSignal(int, object, bool) | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |     def __init__(self, video_sources: List[VideoStreamer], parent=None): |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     def __init__(self, video_sources: List[VideoStreamer], tracker = None, detector = None , parent=None): | 
		
	
		
			
				|  |  |         super(QThread, self).__init__(parent) |  |  |         super(QThread, self).__init__(parent) | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |         self.__detector = Detector(classes=[0, 2, 5, 7]) |  |  |  | 
		
	
		
			
				|  |  |         self.__tracker = Tracker() |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         self.__detector = detector | 
		
	
		
			
				|  |  |  |  |  |         self.__tracker = tracker | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |         self.__video_sources = video_sources |  |  |         self.__video_sources = video_sources | 
		
	
		
			
				|  |  |         self.__processing_source = video_sources[0] |  |  |         self.__processing_source = video_sources[0] | 
		
	
	
		
			
				|  | @ -118,6 +118,7 @@ class Core(QThread): | 
		
	
		
			
				|  |  |         self.__detection_thread = None |  |  |         self.__detection_thread = None | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |     def start_track(self, x: int, y: int, w: int = 0, h: int = 0): |  |  |     def start_track(self, x: int, y: int, w: int = 0, h: int = 0): | 
		
	
		
			
				|  |  |  |  |  |       print(f"start tracking: {x}, {y}, {w}, {h}") | 
		
	
		
			
				|  |  |       try: |  |  |       try: | 
		
	
		
			
				|  |  |         self.__is_detecting = False |  |  |         self.__is_detecting = False | 
		
	
		
			
				|  |  |         self.__is_tracking = False |  |  |         self.__is_tracking = False | 
		
	
	
		
			
				|  | @ -142,12 +143,14 @@ class Core(QThread): | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |       if self.__tracking_thread is not None: |  |  |       if self.__tracking_thread is not None: | 
		
	
		
			
				|  |  |           self.__tracking_thread.join() |  |  |           self.__tracking_thread.join() | 
		
	
		
			
				|  |  |  |  |  |           self.stop_track() | 
		
	
		
			
				|  |  |       self.__is_tracking = True |  |  |       self.__is_tracking = True | 
		
	
		
			
				|  |  |       self.__tracking_thread = Thread(target=self.__tracking) |  |  |       self.__tracking_thread = Thread(target=self.__tracking) | 
		
	
		
			
				|  |  |       self.__tracking_thread.start() |  |  |       self.__tracking_thread.start() | 
		
	
		
			
				|  |  |       sleep(0.03) |  |  |       sleep(0.03) | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |     def stop_track(self): |  |  |     def stop_track(self): | 
		
	
		
			
				|  |  |  |  |  |         print("stop tracking") | 
		
	
		
			
				|  |  |         self.stop_detection() |  |  |         self.stop_detection() | 
		
	
		
			
				|  |  |         self.__tracker.stop() |  |  |         self.__tracker.stop() | 
		
	
		
			
				|  |  |         self.__is_tracking = False |  |  |         self.__is_tracking = False | 
		
	
	
		
			
				|  | 
 |