mirror of
				https://github.com/THU-MIG/yolov10.git
				synced 2025-10-31 14:35:40 +08:00 
			
		
		
		
	ultralytics 8.0.225 multi-video tracker bug fix (#6862)
				
					
				
			Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
		
							parent
							
								
									2b49d71772
								
							
						
					
					
						commit
						093943e375
					
				| @ -78,3 +78,11 @@ keywords: YOLO, Ultralytics, neural network, nn.modules.block, Proto, HGBlock, S | ||||
| ## ::: ultralytics.nn.modules.block.BottleneckCSP | ||||
| 
 | ||||
| <br><br> | ||||
| 
 | ||||
| ## ::: ultralytics.nn.modules.block.ResNetBlock | ||||
| 
 | ||||
| <br><br> | ||||
| 
 | ||||
| ## ::: ultralytics.nn.modules.block.ResNetLayer | ||||
| 
 | ||||
| <br><br> | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| # Ultralytics YOLO 🚀, AGPL-3.0 license | ||||
| 
 | ||||
| __version__ = '8.0.224' | ||||
| __version__ = '8.0.225' | ||||
| 
 | ||||
| from ultralytics.models import RTDETR, SAM, YOLO | ||||
| from ultralytics.models.fastsam import FastSAM | ||||
|  | ||||
| @ -345,9 +345,9 @@ class BasePredictor: | ||||
|         else:  # 'video' or 'stream' | ||||
|             frames_path = f'{save_path.split(".", 1)[0]}_frames/' | ||||
|             if self.vid_path[idx] != save_path:  # new video | ||||
|                 self.vid_path[idx] = save_path | ||||
|                 if self.args.save_frames: | ||||
|                     Path(frames_path).mkdir(parents=True, exist_ok=True) | ||||
|                     self.vid_path[idx] = save_path | ||||
|                     self.vid_frame[idx] = 0 | ||||
|                 if isinstance(self.vid_writer[idx], cv2.VideoWriter): | ||||
|                     self.vid_writer[idx].release()  # release previous video writer | ||||
|  | ||||
| @ -20,16 +20,16 @@ class Heatmap: | ||||
|     def __init__(self): | ||||
|         """Initializes the heatmap class with default values for Visual, Image, track, count and heatmap parameters.""" | ||||
| 
 | ||||
|         # Visual Information | ||||
|         # Visual information | ||||
|         self.annotator = None | ||||
|         self.view_img = False | ||||
| 
 | ||||
|         # Image Information | ||||
|         # Image information | ||||
|         self.imw = None | ||||
|         self.imh = None | ||||
|         self.im0 = None | ||||
| 
 | ||||
|         # Heatmap Colormap and heatmap np array | ||||
|         # Heatmap colormap and heatmap np array | ||||
|         self.colormap = None | ||||
|         self.heatmap = None | ||||
|         self.heatmap_alpha = 0.5 | ||||
| @ -40,7 +40,7 @@ class Heatmap: | ||||
|         self.clss = None | ||||
|         self.track_history = None | ||||
| 
 | ||||
|         # Counting Info | ||||
|         # Counting info | ||||
|         self.count_reg_pts = None | ||||
|         self.count_region = None | ||||
|         self.in_counts = 0 | ||||
| @ -160,7 +160,8 @@ class Heatmap: | ||||
| 
 | ||||
|         return im0_with_heatmap | ||||
| 
 | ||||
|     def display_frames(self, im0_with_heatmap): | ||||
|     @staticmethod | ||||
|     def display_frames(im0_with_heatmap): | ||||
|         """ | ||||
|         Display heatmap. | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Glenn Jocher
						Glenn Jocher