├── Process ├── Train │ ├── Introduce.md │ ├── trainV7.py │ ├── trainV10.py │ ├── trainV11.py │ ├── trainV5.py │ └── trainV8.py └── eval │ ├── Introduce.md │ └── eval_SML2.py ├── ODverse33.pdf ├── README.md └── Drawing.py /Process/Train/Introduce.md: -------------------------------------------------------------------------------- 1 | ## data Training 2 | -------------------------------------------------------------------------------- /ODverse33.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyCol/ODverse33/HEAD/ODverse33.pdf -------------------------------------------------------------------------------- /Process/eval/Introduce.md: -------------------------------------------------------------------------------- 1 | ## data evaluation 2 | In terms of evaluation, the `eval_SML2.py` script is first used to generate the predicted results in JSON format, which are then compared against the ground-truth annotations of the test set. Subsequently, the `pycocotools` library is employed to perform a standard COCO-style evaluation. Key metrics are computed and reported, including `mAP_0.50`, `mAP_0.50:0.95`, as well as scale-specific metrics such as `mAP_small`, `mAP_medium`, and `mAP_large`. 3 | -------------------------------------------------------------------------------- /Process/Train/trainV7.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | import random 4 | import numpy as np 5 | import torch 6 | 7 | def set_seed(seed=42): 8 | random.seed(seed) 9 | np.random.seed(seed) 10 | torch.manual_seed(seed) 11 | torch.cuda.manual_seed_all(seed) 12 | torch.backends.cudnn.deterministic = True 13 | torch.backends.cudnn.benchmark = False 14 | 15 | set_seed(42) 16 | 17 | # Root dataset directories 18 | root_dirs = [ 19 | r"D:\YOLO_Benchmark\medical\brain-tumor", 20 | # Add more if needed 21 | ] 22 | 23 | # YOLOv7 training script path 24 | yolov7_dir = r"D:\YOLO_Benchmark\yolov7" # path to cloned yolov7 repo 25 | train_script = os.path.join(yolov7_dir, "train.py") 26 | 27 | # Loop over each dataset 28 | for root_dir in root_dirs: 29 | data_yaml = os.path.join(root_dir, "data.yaml") 30 | last_folder = os.path.basename(root_dir) 31 | project_name = f"{last_folder}_yolo7" 32 | save_dir = f"D:/YOLO_Benchmark/saved_models/{last_folder}" 33 | 34 | command = [ 35 | "python", train_script, 36 | "--weights", "yolov7.pt", 37 | "--cfg", "cfg/training/yolov7.yaml", 38 | "--data", data_yaml, 39 | "--device", "0", 40 | "--batch-size", "32", 41 | "--epochs", "300", 42 | "--img", "640", 43 | "--project", save_dir, 44 | "--name", project_name, 45 | "--exist-ok" 46 | ] 47 | 48 | print(f"Training: {project_name}") 49 | subprocess.run(command, cwd=yolov7_dir) 50 | print(f"Completed: {project_name}") 51 | -------------------------------------------------------------------------------- /Process/Train/trainV10.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import random 3 | import numpy as np 4 | from ultralytics import YOLO 5 | import os 6 | 7 | # Set random seed for reproducibility 8 | def set_seed(seed=42): 9 | random.seed(seed) 10 | np.random.seed(seed) 11 | torch.manual_seed(seed) 12 | torch.cuda.manual_seed_all(seed) 13 | torch.backends.cudnn.deterministic = True 14 | torch.backends.cudnn.benchmark = False 15 | 16 | set_seed(42) 17 | 18 | # List of dataset root directories 19 | root_dirs = [ 20 | r"D:\YOLO_Benchmark\medical\brain-tumor", 21 | # Add more dataset directories if needed 22 | ] 23 | 24 | # Loop through each dataset root 25 | for root_dir in root_dirs: 26 | # Path to dataset YAML 27 | data_yaml_path = os.path.join(root_dir, "data.yaml") 28 | 29 | # Extract dataset name 30 | last_folder = os.path.basename(root_dir) 31 | 32 | # Set project directory and experiment name 33 | project_root = f"D:/YOLO_Benchmark/saved_models/{last_folder}" 34 | project_name = f"{last_folder}_yolo10m" 35 | 36 | # Load model architecture and pretrained weights 37 | model = YOLO(r"D:\YOLO_Benchmark\ultralytics\ultralytics\cfg\models\v10\yolov10m.yaml") 38 | model = YOLO("yolov10m.pt") # Load pretrained model 39 | 40 | # Train the model 41 | train_results = model.train( 42 | data=data_yaml_path, 43 | epochs=300, 44 | imgsz=640, 45 | batch=32, 46 | device="0", # GPU index 47 | lr0=0.01, 48 | augment=True, 49 | translate=0.1, 50 | scale=0.5, 51 | fliplr=0.5, 52 | hsv_h=0.015, 53 | hsv_s=0.7, 54 | hsv_v=0.4, 55 | mosaic=True, 56 | project=project_root, 57 | name=project_name, 58 | workers=0, 59 | save=True, 60 | save_period=0 61 | ) 62 | 63 | print(f"Training completed: {project_name}") 64 | 65 | # Other version training scripts: 66 | # python ultralytics/trainV5.py 67 | # python ultralytics/trainV8.py 68 | # python ultralytics/trainV9.py 69 | # python ultralytics/trainV10.py 70 | # python ultralytics/trainV11.py 71 | -------------------------------------------------------------------------------- /Process/Train/trainV11.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import random 3 | import numpy as np 4 | from ultralytics import YOLO 5 | import os 6 | 7 | # Set random seed for reproducibility 8 | def set_seed(seed=42): 9 | random.seed(seed) 10 | np.random.seed(seed) 11 | torch.manual_seed(seed) 12 | torch.cuda.manual_seed_all(seed) 13 | torch.backends.cudnn.deterministic = True 14 | torch.backends.cudnn.benchmark = False 15 | 16 | # Apply seed 17 | set_seed(42) 18 | 19 | # List of dataset root directories 20 | root_dirs = [ 21 | r"D:\YOLO_Benchmark\medical\brain-tumor", 22 | # Add more dataset root paths if needed 23 | ] 24 | 25 | # Iterate through each dataset and train the model 26 | for root_dir in root_dirs: 27 | # Path to the dataset YAML 28 | data_yaml_path = os.path.join(root_dir, "data.yaml") 29 | 30 | # Extract folder name for naming the project 31 | last_folder = os.path.basename(root_dir) 32 | 33 | # Define the save directory and experiment name 34 | project_root = f"D:/YOLO_Benchmark/saved_models/{last_folder}" 35 | project_name = f"{last_folder}_yolo11m" 36 | 37 | # Load the model config and pretrained weights 38 | model = YOLO(r"D:\YOLO_Benchmark\ultralytics\ultralytics\cfg\models\11\yolo11.yaml") 39 | model = YOLO("yolo11m.pt") 40 | 41 | # Train the model 42 | train_results = model.train( 43 | data=data_yaml_path, 44 | epochs=300, 45 | imgsz=640, 46 | batch=32, 47 | device="0", # Use GPU 0 48 | lr0=0.01, 49 | augment=True, 50 | translate=0.1, 51 | scale=0.5, 52 | fliplr=0.5, 53 | hsv_h=0.015, 54 | hsv_s=0.7, 55 | hsv_v=0.4, 56 | mosaic=True, 57 | project=project_root, 58 | name=project_name, 59 | workers=0, 60 | save=True, 61 | save_period=0 62 | ) 63 | 64 | print(f"Training completed: {project_name}") 65 | 66 | # Training script reference for different YOLO versions: 67 | # python ultralytics/trainV5.py 68 | # python ultralytics/trainV8.py 69 | # python ultralytics/trainV9.py 70 | # python ultralytics/trainV10.py 71 | # python ultralytics/trainV11.py 72 | -------------------------------------------------------------------------------- /Process/Train/trainV5.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import random 3 | import numpy as np 4 | from ultralytics import YOLO 5 | import os 6 | 7 | # Set random seed for reproducibility 8 | def set_seed(seed=42): 9 | random.seed(seed) 10 | np.random.seed(seed) 11 | torch.manual_seed(seed) 12 | torch.cuda.manual_seed_all(seed) 13 | torch.backends.cudnn.deterministic = True 14 | torch.backends.cudnn.benchmark = False 15 | 16 | # Apply the seed 17 | set_seed(42) 18 | 19 | # List of dataset root directories 20 | root_dirs = [ 21 | r"D:\YOLO_Benchmark\medical\brain-tumor", 22 | # Add more root directories here 23 | ] 24 | 25 | # Iterate through each dataset root directory and train YOLO 26 | for root_dir in root_dirs: 27 | # Path to the dataset YAML configuration file 28 | data_yaml_path = os.path.join(root_dir, "data.yaml") 29 | 30 | # Get the last folder name as project identifier 31 | last_folder = os.path.basename(root_dir) 32 | 33 | # Define paths for saving model weights and logs 34 | project_root = f"D:/YOLO_Benchmark/saved_models/{last_folder}" 35 | project_name = f"{last_folder}_yolo5m" 36 | 37 | # Load YOLO model configuration and pretrained weights 38 | model = YOLO(r"D:\YOLO_Benchmark\ultralytics\ultralytics\cfg\models\v5\yolov5.yaml") # Config file 39 | model = YOLO("yolov5mu.pt") # Pretrained weights 40 | 41 | # Start training 42 | train_results = model.train( 43 | data=data_yaml_path, 44 | epochs=300, 45 | imgsz=640, 46 | batch=32, 47 | device="0", # GPU index (0 for first GPU) 48 | lr0=0.01, 49 | augment=True, 50 | translate=0.1, 51 | scale=0.5, 52 | fliplr=0.5, 53 | hsv_h=0.015, 54 | hsv_s=0.7, 55 | hsv_v=0.4, 56 | mosaic=True, 57 | project=project_root, 58 | name=project_name, 59 | workers=0, 60 | save=True, 61 | save_period=0 62 | ) 63 | 64 | print(f"Training completed: {project_name}") 65 | 66 | # Script variants for different model versions: 67 | # python ultralytics/trainV5.py 68 | # python ultralytics/trainV8.py 69 | # python ultralytics/trainV9.py 70 | # python ultralytics/trainV10.py 71 | # python ultralytics/trainV11.py 72 | -------------------------------------------------------------------------------- /Process/Train/trainV8.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import random 3 | import numpy as np 4 | from ultralytics import YOLO 5 | import os 6 | 7 | # Set random seed for reproducibility 8 | def set_seed(seed=42): 9 | random.seed(seed) 10 | np.random.seed(seed) 11 | torch.manual_seed(seed) 12 | torch.cuda.manual_seed_all(seed) 13 | torch.backends.cudnn.deterministic = True 14 | torch.backends.cudnn.benchmark = False 15 | 16 | # Apply the seed 17 | set_seed(42) 18 | 19 | # List of dataset root directories 20 | root_dirs = [ 21 | r"D:\YOLO_Benchmark\medical\bone-fracture\bone-fracture", 22 | # Add more dataset root directories if needed 23 | ] 24 | 25 | # Loop through each dataset directory and start training 26 | for root_dir in root_dirs: 27 | # Path to the dataset configuration (data.yaml) 28 | data_yaml_path = os.path.join(root_dir, "data.yaml") 29 | 30 | # Get the last folder name to use as an identifier 31 | last_folder = os.path.basename(root_dir) 32 | 33 | # Define where to save the model and logs 34 | project_root = f"D:/YOLO_Benchmark/saved_models/{last_folder}" 35 | project_name = f"{last_folder}_yolo8m" 36 | 37 | # Load the pretrained YOLOv8 model (medium version) 38 | model = YOLO("yolov8m.pt") 39 | 40 | # Start training the model 41 | train_results = model.train( 42 | data=data_yaml_path, 43 | epochs=300, # Number of training epochs 44 | imgsz=640, # Input image size 45 | batch=32, # Batch size 46 | device="0", # GPU index (0 for the first GPU) 47 | lr0=0.01, # Initial learning rate 48 | augment=True, # Enable data augmentation 49 | translate=0.1, # Random translation 50 | scale=0.5, # Random scaling 51 | fliplr=0.5, # Horizontal flip probability 52 | hsv_h=0.015, # HSV hue augmentation 53 | hsv_s=0.7, # HSV saturation augmentation 54 | hsv_v=0.4, # HSV value augmentation 55 | mosaic=True, # Enable mosaic augmentation 56 | project=project_root, # Directory to save results 57 | name=project_name, # Project name 58 | workers=0, # Number of dataloader workers 59 | save=True, # Save checkpoints 60 | save_period=0 # Save every epoch (0 means only save best and last) 61 | ) 62 | 63 | print(f"Training completed: {project_name}") 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ODverse33 2 | **Newer YOLO versions are not always better!** 3 | 4 | **ODverse33** is a comprehensive benchmark that includes **33 high-quality datasets** spanning **11 diverse domains**. It provides a **multi-domain evaluation** for YOLO models, ranging from **YOLOv5 to YOLOv11**. 5 | 6 | The paper, **"ODVerse33: Is the New YOLO Version Always Better? A Multi-Domain Benchmark from YOLO v5 to v11"**, is now available on [*ArXiv*](http://arxiv.org/abs/2502.14314). 7 | 8 | 9 | ### 🌐 Covered Domains 10 | 11 |
| Autonomous Driving | 14 |Agricultural | 15 |Underwater | 16 |
| Medical | 19 |Videogame | 20 |Industrial | 21 |
| Aerial | 24 |Wildlife | 25 |Retail | 26 |
| Microscopic | 29 |Security | 30 |31 | |
55 |
56 |