mirror of
				https://github.com/THU-MIG/yolov10.git
				synced 2025-11-04 17:05:40 +08:00 
			
		
		
		
	Add OBB benchmarks to CI (#7777)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
		
							parent
							
								
									1152a06cbc
								
							
						
					
					
						commit
						3c1170769a
					
				
							
								
								
									
										3
									
								
								.github/workflows/ci.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/ci.yaml
									
									
									
									
										vendored
									
									
								
							@ -127,6 +127,9 @@ jobs:
 | 
			
		||||
      - name: Benchmark PoseModel
 | 
			
		||||
        shell: bash
 | 
			
		||||
        run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-pose.pt' imgsz=160 verbose=0.185
 | 
			
		||||
      - name: Benchmark OBBModel
 | 
			
		||||
        shell: bash
 | 
			
		||||
        run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-obb.pt' imgsz=160 verbose=0.360
 | 
			
		||||
      - name: Merge Coverage Reports
 | 
			
		||||
        run: |
 | 
			
		||||
          coverage xml -o coverage-benchmarks.xml
 | 
			
		||||
 | 
			
		||||
@ -48,7 +48,7 @@ def build_docs(use_languages=False, clone_repos=True):
 | 
			
		||||
        if not local_dir.exists():
 | 
			
		||||
            os.system(f"git clone {repo} {local_dir}")
 | 
			
		||||
        os.system(f"git -C {local_dir} pull")  # update repo
 | 
			
		||||
        shutil.rmtree(DOCS / "en/hub/sdk")
 | 
			
		||||
        shutil.rmtree(DOCS / "en/hub/sdk", ignore_errors=True)  # delete if exists
 | 
			
		||||
        shutil.copytree(local_dir / "docs", DOCS / "en/hub/sdk")
 | 
			
		||||
        shutil.rmtree(DOCS / "en/hub/sdk/reference")  # temporarily delete reference until we find a solution for this
 | 
			
		||||
        print(f"Cloned/Updated {repo} in {local_dir}")
 | 
			
		||||
 | 
			
		||||
@ -351,7 +351,7 @@ nav:
 | 
			
		||||
          - Models: hub/models.md
 | 
			
		||||
          - Integrations: hub/integrations.md
 | 
			
		||||
          - Inference API: hub/inference-api.md
 | 
			
		||||
      - On Premise:
 | 
			
		||||
      - On-Premise:
 | 
			
		||||
          - hub/on-premise/index.md
 | 
			
		||||
      - App:
 | 
			
		||||
          - hub/app/index.md
 | 
			
		||||
 | 
			
		||||
@ -51,7 +51,7 @@ TASK2METRIC = {
 | 
			
		||||
    "segment": "metrics/mAP50-95(M)",
 | 
			
		||||
    "classify": "metrics/accuracy_top1",
 | 
			
		||||
    "pose": "metrics/mAP50-95(P)",
 | 
			
		||||
    "obb": "metrics/mAP50-95(OBB)",
 | 
			
		||||
    "obb": "metrics/mAP50-95(B)",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
CLI_HELP_MSG = f"""
 | 
			
		||||
 | 
			
		||||
@ -83,8 +83,12 @@ def benchmark(
 | 
			
		||||
    for i, (name, format, suffix, cpu, gpu) in export_formats().iterrows():  # index, (name, format, suffix, CPU, GPU)
 | 
			
		||||
        emoji, filename = "❌", None  # export defaults
 | 
			
		||||
        try:
 | 
			
		||||
            assert i != 9 or LINUX, "Edge TPU export only supported on Linux"
 | 
			
		||||
            if i in {5, 10}:  # CoreML and TF.js
 | 
			
		||||
            # Checks
 | 
			
		||||
            if i == 9:
 | 
			
		||||
                assert LINUX, "Edge TPU export only supported on Linux"
 | 
			
		||||
            elif i == 7:
 | 
			
		||||
                assert model.task != "obb", "TensorFlow GraphDef not supported for OBB task"
 | 
			
		||||
            elif i in {5, 10}:  # CoreML and TF.js
 | 
			
		||||
                assert MACOS or LINUX, "export only supported on macOS and Linux"
 | 
			
		||||
            if "cpu" in device.type:
 | 
			
		||||
                assert cpu, "inference not supported on CPU"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user