Spaces:
Sleeping
Sleeping
File size: 22,035 Bytes
04d8858 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
<!DOCTYPE html>
<html lang="en">
<head>
<title>PlayerTV</title>
<link rel="icon" type="image/webp" href="/static/poster/playertv.webp">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet" />
</head>
<body>
<!-- Dark mode -->
<div class="dark-mode-toggle-container">
<span class="dark-mode-toggle-label">Dark Mode:</span>
<label class="switch">
<input type="checkbox" id="darkModeToggle">
<span class="slider"></span>
</label>
</div>
<!-- pop up for the advance mode -->
<div id="configAdvModal" class="config-modal">
<div class="config-modal-content">
<span class="config-modal-close">×</span>
<h2>Advanced Settings</h2>
<div class="card-grid">
<!-- Object Detection Parameters Card -->
<div class="config-card">
<h3>Object Detection Parameters</h3>
<div class="config-item">
<label for="predictor_type">Object Detection Model:</label>
<select id="predictor_type">
<option value="predictor_type_yolov8" selected>YOLOv8</option>
<option value="predictor_type_yolov82">YOLOx</option>
</select>
</div>
<div class="config-item">
<label for="ckpt">Checkpoint:</label>
<input type="text" id="ckpt" name="ckpt" value="path/to/model/weight.pt">
</div>
<div class="config-item">
<label for="conf_thres">Confidence Threshold:</label>
<input type="text" id="conf_thres" name="conf_thres" value="0.25" min="0" max="1" step="0.01">
</div>
<div class="config-item">
<label for="iou_thresh">IoU Threshold:</label>
<input type="text" id="iou_thresh" name="iou_thresh" value="0.7" min="0" max="1" step="0.01">
</div>
<div class="config-item">
<label for="iou_nms_thres">IoU NMS Threshold:</label>
<input type="number" id="iou_nms_thres" name="iou_nms_thres" value="0.7" min="0" max="1"
step="0.01">
</div>
<div class="config-item">
<label for="inf_img_size">Information Image Size:</label>
<input type="text" id="inf_img_size" name="inf_img_size" value="[800, 1440]">
</div>
<div class="config-item">
<label for="class_whitelist">Class Whitelist:</label>
<input type="text" id="class_whitelist" name="class_whitelist" value="[0]">
</div>
</div>
<!-- Deep EIOU Parameters Card -->
<div class="config-card">
<h3>Deep-EIoU Parameters</h3>
<div class="config-item">
<label for="saveVideo">Save Video:</label>
<input type="checkbox" id="saveVideo" name="saveVideo" checked>
</div>
<div class="config-item">
<label for="device">Device:</label>
<select id="device">
<option value="gpu" selected>GPU</option>
<option value="cpu">CPU</option>
</select>
</div>
<div class="config-item">
<label for="trackHighThresh">Track High Threshold:</label>
<input type="number" id="trackHighThresh" name="trackHighThresh" value="0.25" min="0" max="1"
step="0.01">
</div>
<div class="config-item">
<label for="trackLowThresh">Track Low Threshold:</label>
<input type="number" id="trackLowThresh" name="trackLowThresh" value="0.25" min="0" max="1"
step="0.01">
</div>
<div class="config-item">
<label for="trackBuffer">Track Buffer:</label>
<input type="number" id="trackBuffer" name="trackBuffer" value="0.25" min="0" max="1"
step="0.01">
</div>
<div class="config-item">
<label for="matchThresh">Match Threshold:</label>
<input type="number" id="matchThresh" name="matchThresh" value="0.25" min="0" max="1"
step="0.01">
</div>
<div class="config-item">
<label for="aspectRatioThresh">Aspect Ratio Threshold:</label>
<input type="number" id="aspectRatioThresh" name="aspectRatioThresh" value="0.25" min="0"
max="1" step="0.01">
</div>
<div class="config-item">
<label for="minBoxArea">Min Box Area:</label>
<input type="number" id="minBoxArea" name="minBoxArea" value="0.25" min="0" max="1" step="0.01">
</div>
<div class="config-item">
<label for="nmsThresh">NMS Threshold:</label>
<input type="number" id="nmsThresh" name="nmsThresh" value="0.25" min="0" max="1" step="0.01">
</div>
<div class="config-item">
<label for="proximity_thresh">Proximity Threshold:</label>
<input type="number" id="proximity_thresh" name="proximity_thresh" value="0.25" min="0" max="1"
step="0.01">
</div>
<div class="config-item">
<label for="appearance_thresh">Appearance Threshold:</label>
<input type="number" id="appearance_thresh" name="appearance_thresh" value="0.25" min="0"
max="1" step="0.01">
</div>
<div class="config-item">
<label for="frame_skip">Frame Skip:</label>
<input type="number" id="frame_skip" name="frame_skip" value="1" step="1">
</div>
</div>
<!-- OCR Parameters Card -->
<div class="config-card">
<h3>OCR Parameters</h3>
<div class="config-item">
<label for="which_OCR">OCR Method:</label>
<select id="which_OCR">
<option value="which_OCR_easyocr" selected>EasyOCR</option>
<option value="which_OCR_Paddle">Paddle</option>
</select>
</div>
<div class="config-item">
<label for="lang_lsit">Language List:</label>
<input type="text" id="lang_lsit" name="lang_lsit" value="en">
</div>
<div class="config-item">
<label for="sample_rate">Sample Rate</label>
<input type="number" id="sample_rate" name="sample_rate" value="30" min="1" max="100" step="1">
</div>
<div class="config-item">
<label for="stop_at_detection">Stop at Detection:</label>
<input type="checkbox" id="stop_at_detection" name="stop_at_detection" checked>
</div>
<div class="config-item">
<label for="num_of_tume_zones">Number of Time Zones:</label>
<input type="number" id="num_of_tume_zones" name="num_of_tume_zones" value="5" min="1" max="10"
step="1">
</div>
</div>
<!-- RGB Parameters Card -->
<div class="config-card">
<h3>RGB Parameters</h3>
<div class="config-item">
<label for="RGB_metrics_dropdown">RGB Metric:</label>
<select id="RGB_metrics_dropdown">
<option value="RGB_metrics_dropdown_Cielab" selected>Cielab</option>
<option value="RGB_metrics_dropdown_weighted_rgb_metric">Weighted RGB Metric</option>
</select>
</div>
<div class="config-item">
<label for="cluster_method">Cluster Method:</label>
<select id="cluster_method">
<option value="cluster_method_kmeans" selected>KMeans</option>
<option value="cluster_method_kmeans2">Kmeans2</option>
</select>
</div>
<div class="config-item">
<label for="distance_metric">Distance Metric:</label>
<select id="distance_metric">
<option value="distance_metric_weighted_rgb" selected>Weighted RGB</option>
<option value="distance_metric_weighted_rgb2">Weighted RGB2</option>
</select>
</div>
<div class="config-item">
<label for="scoring_function">Scoring Function:</label>
<select id="scoring_function">
<option value="scoring_function_brisque" selected>Brisque</option>
<option value="scoring_function_brisque2">Brisque2</option>
</select>
</div>
<div class="config-item">
<label for="offset_y_top">Offset y-top:</label>
<input type="number" id="offset_y_top" name="offset_y_top" value="0.25" min="0" max="1"
step="0.1">
</div>
<div class="config-item">
<label for="offset_y_bot">Offset y-bottom:</label>
<input type="number" id="offset_y_bot" name="offset_y_bot" value="0.5" min="0" max="1"
step="0.1">
</div>
<div class="config-item">
<label for="offset_x_left">Offset x-left:</label>
<input type="number" id="offset_x_left" name="offset_x_left" value="0.33" min="0" max="1"
step="0.1">
</div>
<div class="config-item">
<label for="offset_x_right">Offset x-right:</label>
<input type="number" id="offset_x_right" name="offset_x_right" value="0.33" min="0" max="1"
step="0.1">
</div>
<div class="config-item">
<label for="crop_score_function">Crop Score Function:</label>
<select id="crop_score_function">
<option value="iou_score" selected>IoU Score</option>
<option value="iou_score2">IOU score2</option>
</select>
</div>
</div>
<!-- Processor Parameters Card -->
<!-- Other categories (Color Mapping Performance, Team Mapping Performance, Player Mapping Performance) -->
</div>
</div>
</div>
<!-- Version Badge -->
<div id="versionBadge">v0.4</div>
<div id="JersyContainer" style="display: none">
<div id="leftImagesContainer">
<div class="image-title">Selected Team:</div>
<div class="image-box" id="boxLeftTeam">
<div class="image-title" style="text-align: left;">Home Kit</div>
<img src="/static/teams_jersy/placeholder.png" alt="Left Image" id="leftTeamImage" />
</div>
<div class="image-box" id="boxLeftTeam2">
<div class="image-title" style="text-align: left;">Away Kit</div>
<img src="/static/teams_jersy/placeholder.png" alt="Left Image" id="leftTeamImage2" />
</div>
</div>
<div class="image-box" id="boxRightTeam">
<div class="image-title">Selected Player:</div>
<img src="/static/teams_jersy/placeholder.png" alt="Right Image" id="rightTeamImage" />
</div>
</div>
<div class="container title-section">
<h1 style="text-align: center">PlayerTV</h1>
</div>
<div class="container">
<div class="arrowSection">
<button id="accordionToggleVideo">
<i class="fa-solid fa-angle-down"></i>
<span>Step 1: Input</span>
</button>
</div>
<div class="row" id="videoSection" style="margin-top: 3%;">
<div class="column left">
<form id="videoForm" class="videoPlayerInput1">
<h2 style="text-align: left">Input Video</h2>
<h4 for="m3u8Input">M3U8 Playlist URL:</h4>
<input type="text" id="m3u8Input" name="m3u8Url" />
<button class="filter-button" type="submit">Fetch Video</button>
</form>
<!-- <div class="filtering-container">
<h2>Input Metadata</h2>
<div class="dropdown-box">
<input type="file" id="fileInput" accept=".json" class="input-file" />
</div>
<div class="dropdown-box">
<label for="teamDropdown" class="label-dropdown">Select Team:</label>
<select id="teamDropdown" class="dropdown">
Options will be populated dynamically -->
<!-- </select>
</div>
<div class="dropdown-box">
<label for="playerDropdown" class="label-dropdown">Select Player:</label>
<select id="playerDropdown" class="dropdown">
Options will be populated dynamically -->
<!-- </select>
</div>
<button id="filterButton" class="filter-button" title="Create per-player compilation.">Clip Video</button>
</div> -->
</div>
<div class="column right">
<div id="overlay" style="
border-radius: 10px;
display: none;
position: absolute;
background: rgba(0, 0, 0, 0.75);
color: white;
width: 98%;
height: 100%;
justify-content: center;
align-items: center;
text-align: center;
">
<h2 style="margin-top: 0%">
Input video is being processed ...
</h2>
<img style="width: 20%" src="/static/poster/03-42-18-223_512.webp" alt="" />
</div>
<video id="videoPlayer" controls poster="/static/poster/poster.png">
<source type="video/mp4" />
Your browser does not support the video tag.
</video>
</div>
</div>
</div>
<!-- Configuration Section -->
<div class="container">
<div class="arrowSection">
<button id="accordionToggleVideo3">
<i class="fa-solid fa-angle-down"></i>
<span>Step 2: Configuration</span>
</button>
</div>
<!-- Container for Configuration Options -->
<div id="configurationSection" class="configuration-section hidden" style="margin-top: 3%;">
<div class="config-card">
<h3>Metadata</h3>
<div class="dropdown-box">
<input type="file" id="fileInput" accept=".json" class="input-file" />
</div>
<div class="dropdown-box">
<label for="teamDropdown" class="label-dropdown">Select Team:</label>
<select id="teamDropdown" class="dropdown">
<!-- Options will be populated dynamically -->
</select>
</div>
<div class="dropdown-box">
<label for="playerDropdown" class="label-dropdown">Select Player:</label>
<select id="playerDropdown" class="dropdown">
<!-- Options will be populated dynamically -->
</select>
</div>
</div>
<div class="divider">
<span class="divider-text">OR</span>
</div>
<div class="config-card">
<!-- The checkbox for the advance mode -->
<div class="config-adv-checkbox">
<input type="checkbox" id="configAdvMode" name="configAdvMode">
<label for="configAdvMode" class="checkmark"></label>
<label for="configAdvMode" style="cursor: pointer;">
<h4>Advanced Mode</h4>
</label>
</div>
<!-- Row containing three boxes -->
<div class="config-row">
<!-- Box 1 -->
<div class="filtering-container" style="width: 100%;">
<h3>RGB Metric</h3>
<div class="dropdown-box">
<label for="Rgb_metric" class="label-dropdown">RGB Metric:</label>
<select id="Rgb_metric" class="dropdown">
<option value="cielab">Cielab</option>
<option value="weighted_rgb">Weighted RGB Metric</option>
</select>
</div>
</div>
<!-- Box 2 -->
<div class="filtering-container" style="width: 100%;">
<h3>OCR Method</h3>
<div class="dropdown-box">
<label for="which_ocr" class="label-dropdown">OCR Method:</label>
<select id="which_ocr" class="dropdown">
<option value="Paddle">Paddle</option>
<option value="easyocr">Easy OCR</option>
</select>
</div>
</div>
<!-- Box 3 -->
<div class="filtering-container" style="width: 100%;">
<h3>Object Detection Model:</h3>
<!-- Example dropdown -->
<div class="dropdown-box">
<label for="detector" class="label-dropdown">Object Detection Model:</label>
<select id="detector" class="dropdown">
<option value="yolov8">YOLOv8</option>
<option value="yolox">YOLOx</option>
</select>
</div>
</div>
</div>
</div>
<button id="filterButton" class="filter-button" title="Create per-player compilation.">Clip Video</button>
</div>
</div>
<div class="container">
<div class="arrowSection">
<button id="accordionToggleVideo2">
<i class="fa-solid fa-angle-down"></i>
<span>Step 3: Output</span>
</button>
</div>
<!-- Container to display filtered results -->
<div id="filteredResults" class="filtered-results hidden" style="margin-top: 3%; position: relative;">
<div id="overlay_result" style="
border-radius: 10px;
display: none;
position: absolute;
background: rgba(0, 0, 0, 0.75);
color: white;
width: 70%;
height: 100%;
justify-content: center;
align-items: center;
text-align: center;
top: 0;
left: 15%;
">
<h2 style="margin-top: 0%">
Output video is being created ...
</h2>
<img style="width: 20%" src="/static/poster/03-42-18-223_512.webp" alt="" />
</div>
<video id="videoPlayer_result" controls width="640" height="360" poster="/static/poster/poster.png">
<source id="videoSource" type="video/mp4" />
Your browser does not support the video tag.
</video>
</div>
</div>
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
</body>
</html> |