Subh775 commited on
Commit
e0d9763
·
1 Parent(s): 463cb88

about section optimization

Browse files
Files changed (2) hide show
  1. frontend/initial.html +6 -5
  2. frontend/vehicles.html +30 -7
frontend/initial.html CHANGED
@@ -185,12 +185,13 @@
185
  <canvas id="drawing-canvas" class="absolute inset-0 w-full h-full"></canvas>
186
  </div>
187
 
188
- <div class="flex space-x-3">
189
- <button onclick="resetCanvas()"
190
- class="w-1/3 py-3.5 rounded-full font-bold transition-all text-sm" style="background:#111;border:1px solid #2a2a2a;color:#a89f97">Reset</button>
191
  <button id="btn-proceed" onclick="startRun()"
192
- class="w-2/3 py-3.5 rounded-full font-bold transition-all text-center text-sm" style="background:#c89a6c;color:#000">Continue
193
- &nbsp;&rarr;</button>
 
 
 
194
  </div>
195
  </div>
196
 
 
185
  <canvas id="drawing-canvas" class="absolute inset-0 w-full h-full"></canvas>
186
  </div>
187
 
188
+ <div class="flex flex-col items-center gap-3">
 
 
189
  <button id="btn-proceed" onclick="startRun()"
190
+ class="w-fit px-16 py-3.5 rounded-full font-bold transition-all text-center text-sm shadow-lg hover:scale-105 active:scale-95" style="background:#c89a6c;color:#000">
191
+ Continue &nbsp;&rarr;
192
+ </button>
193
+ <button onclick="resetCanvas()"
194
+ class="text-[10px] font-bold uppercase tracking-widest text-slate-500 hover:text-white transition" style="background:none;border:none;">Reset Boundary</button>
195
  </div>
196
  </div>
197
 
frontend/vehicles.html CHANGED
@@ -363,7 +363,7 @@
363
 
364
  <!-- TAB: About -->
365
  <div id="tab-about" class="hidden flex-1 min-h-0 overflow-y-auto">
366
- <div class="h-full bg-black border border-slate-800 rounded-xl p-8 shadow-2xl space-y-10">
367
  <div class="text-center">
368
  <p class="text-[13px] font-montserrat font-bold italic leading-relaxed max-w-3xl mx-auto"
369
  style="color:#a89f97">
@@ -721,6 +721,15 @@
721
  </div>
722
  </div>
723
  </div>
 
 
 
 
 
 
 
 
 
724
  </div>
725
  </div>
726
 
@@ -748,6 +757,15 @@
748
  <option value="gold">Monochrome Gold</option>
749
  </select>
750
  </div>
 
 
 
 
 
 
 
 
 
751
  <div class="s-row hidden">
752
  <div>
753
  <div class="text-xs font-semibold text-slate-700">Interface Mode</div>
@@ -765,18 +783,18 @@
765
  </div>
766
 
767
  <!-- Start Button -->
768
- <div class="col-span-3 pb-4" id="settings-start-wrap">
769
  <button id="btn-start-processing" onclick="startProcessingFromSettings()"
770
- class="w-full py-4 font-bold text-sm rounded-full transition flex items-center justify-center gap-2 shadow-lg"
771
  style="background:#0a0a0a;border:1px solid var(--cocoa);color:var(--cocoa-l)">
772
  <span>Process <i class="fa-solid fa-arrow-right ml-2 text-[10px]"></i></span>
773
  </button>
774
  </div>
775
 
776
  <!-- New Analysis Button (visible only after processing completes) -->
777
- <div class="col-span-3 pb-4 hidden" id="new-analysis-wrap">
778
  <button onclick="startNewAnalysis()"
779
- class="w-full py-4 font-bold text-sm rounded-full transition flex items-center justify-center gap-2"
780
  style="background:var(--cocoa-l);color:#000">
781
  <i class="fa-solid fa-rotate-left text-xs"></i>
782
  <span>New Analysis</span>
@@ -1183,7 +1201,8 @@
1183
  imgsz: { min: 640, max: 1280 },
1184
  conf: { min: 0.10, max: 0.95 },
1185
  iou: { min: 0.50, max: 0.95 },
1186
- stride: { min: 1, max: 10 }
 
1187
  };
1188
 
1189
  function stepParam(param, delta) {
@@ -1193,7 +1212,7 @@
1193
  let val = parseFloat(el.textContent);
1194
  val = Math.round((val + delta) * 100) / 100;
1195
  val = Math.max(limits.min, Math.min(limits.max, val));
1196
- el.textContent = (param === 'conf' || param === 'iou') ? val.toFixed(2) : val;
1197
  }
1198
 
1199
  function lockSettings() {
@@ -1589,6 +1608,10 @@
1589
  }
1590
  }
1591
 
 
 
 
 
1592
  function toggleChip(id) {
1593
  const chip = document.getElementById(`chip-${id}`);
1594
  chip.classList.toggle('active');
 
363
 
364
  <!-- TAB: About -->
365
  <div id="tab-about" class="hidden flex-1 min-h-0 overflow-y-auto">
366
+ <div class="bg-black border border-slate-800 rounded-xl p-12 shadow-2xl space-y-12 min-h-full flex flex-col justify-center">
367
  <div class="text-center">
368
  <p class="text-[13px] font-montserrat font-bold italic leading-relaxed max-w-3xl mx-auto"
369
  style="color:#a89f97">
 
721
  </div>
722
  </div>
723
  </div>
724
+ <div class="s-row" data-param="smoothing">
725
+ <div>
726
+ <div class="text-xs font-semibold text-slate-700">Congestion Smoothing</div>
727
+ <div class="text-[10px] text-slate-400">Alpha factor for rolling average</div>
728
+ </div>
729
+ <div class="s-stepper"><button onclick="stepParam('smoothing',-0.05)">&#8249;</button><span
730
+ class="s-val" id="sv-smoothing">0.25</span><button
731
+ onclick="stepParam('smoothing',0.05)">&#8250;</button></div>
732
+ </div>
733
  </div>
734
  </div>
735
 
 
757
  <option value="gold">Monochrome Gold</option>
758
  </select>
759
  </div>
760
+ <div class="s-row mt-4">
761
+ <div>
762
+ <div class="text-xs font-semibold text-slate-700">Auto-Download Report</div>
763
+ <div class="text-[10px] text-slate-400">Save PDF automatically on completion</div>
764
+ </div>
765
+ <div class="toggle-track" id="sv-auto-download" onclick="toggleAutoDownload(this)">
766
+ <div class="toggle-thumb"></div>
767
+ </div>
768
+ </div>
769
  <div class="s-row hidden">
770
  <div>
771
  <div class="text-xs font-semibold text-slate-700">Interface Mode</div>
 
783
  </div>
784
 
785
  <!-- Start Button -->
786
+ <div class="col-span-3 pb-4 flex justify-center" id="settings-start-wrap">
787
  <button id="btn-start-processing" onclick="startProcessingFromSettings()"
788
+ class="w-fit px-16 py-4 font-bold text-sm rounded-full transition flex items-center justify-center gap-2 shadow-lg hover:scale-105 active:scale-95"
789
  style="background:#0a0a0a;border:1px solid var(--cocoa);color:var(--cocoa-l)">
790
  <span>Process <i class="fa-solid fa-arrow-right ml-2 text-[10px]"></i></span>
791
  </button>
792
  </div>
793
 
794
  <!-- New Analysis Button (visible only after processing completes) -->
795
+ <div class="col-span-3 pb-4 hidden justify-center" id="new-analysis-wrap">
796
  <button onclick="startNewAnalysis()"
797
+ class="w-fit px-16 py-4 font-bold text-sm rounded-full transition flex items-center justify-center gap-2 shadow-lg hover:scale-105 active:scale-95"
798
  style="background:var(--cocoa-l);color:#000">
799
  <i class="fa-solid fa-rotate-left text-xs"></i>
800
  <span>New Analysis</span>
 
1201
  imgsz: { min: 640, max: 1280 },
1202
  conf: { min: 0.10, max: 0.95 },
1203
  iou: { min: 0.50, max: 0.95 },
1204
+ stride: { min: 1, max: 10 },
1205
+ smoothing: { min: 0.05, max: 0.95 }
1206
  };
1207
 
1208
  function stepParam(param, delta) {
 
1212
  let val = parseFloat(el.textContent);
1213
  val = Math.round((val + delta) * 100) / 100;
1214
  val = Math.max(limits.min, Math.min(limits.max, val));
1215
+ el.textContent = (param === 'conf' || param === 'iou' || param === 'smoothing') ? val.toFixed(2) : val;
1216
  }
1217
 
1218
  function lockSettings() {
 
1608
  }
1609
  }
1610
 
1611
+ function toggleAutoDownload(el) {
1612
+ el.classList.toggle('active');
1613
+ }
1614
+
1615
  function toggleChip(id) {
1616
  const chip = document.getElementById(`chip-${id}`);
1617
  chip.classList.toggle('active');