# C++ 管线批量重生 CCPD_SPE (24核) $ErrorActionPreference = "Continue" $env:Path = "C:\opencv\build\x64\vc16\bin;$env:Path" $EXE = "C:\Users\Kirl\Desktop\ICEv2\ICE_Dataset\CCPD_SPE_GEN\cpp_pipeline\build\Release\plate_swap.exe" $POOL = "C:\Users\Kirl\Desktop\ICEv2\ICE_Dataset\cpp_pipeline\output\plate_pool" $CCPD = "C:\Users\Kirl\Desktop\ICEv2\ICE_Dataset\CCPD\CCPD2019" $SPE = "C:\Users\Kirl\Desktop\ICEv2\ICE_Dataset\CCPD_SPE" # 清旧 if (Test-Path $SPE) { Write-Host "删除旧 CCPD_SPE..." Remove-Item -Recurse -Force $SPE } $DIST = @{ 'ccpd_base' = 588 'ccpd_blur' = 55 'ccpd_challenge' = 159 'ccpd_fn' = 58 'ccpd_rotate' = 30 'ccpd_tilt' = 82 'ccpd_weather' = 28 } $TYPES = @('police','army','gangao','shiguan_old','shiguan_new', 'lingguan_old','lingguan_new','coach','new_energy') $total = 0 $sw = [System.Diagnostics.Stopwatch]::StartNew() foreach ($type in $TYPES) { Write-Host "`n=== $type ===" -ForegroundColor Cyan foreach ($subdir in $DIST.Keys) { $count = $DIST[$subdir] $ccpdDir = Join-Path $CCPD $subdir $outDir = Join-Path $SPE "$subdir\$type" New-Item -ItemType Directory -Force -Path $outDir | Out-Null Write-Host " $subdir : $count 张... " -NoNewline & $EXE --ccpd-dir $ccpdDir --plate-type $type --plate-pool $POOL ` --output $outDir --num $count --workers 24 --seed 42 2>&1 | Out-Null if ($LASTEXITCODE -eq 0) { Write-Host "OK" -ForegroundColor Green $total += $count } else { Write-Host "FAIL" -ForegroundColor Red } } } $sw.Stop() Write-Host "`nDONE! $total 张, $([math]::Round($sw.Elapsed.TotalMinutes,1))min" -ForegroundColor Green