Spaces:
Running
Running
feedback updated; minor key improvements..
Browse files- README.md +21 -32
- frontend/vehicles.html +94 -13
README.md
CHANGED
|
@@ -6,48 +6,37 @@ colorTo: yellow
|
|
| 6 |
sdk: docker
|
| 7 |
pinned: true
|
| 8 |
license: apache-2.0
|
| 9 |
-
short_description:
|
| 10 |
thumbnail: >-
|
| 11 |
https://cdn-uploads.huggingface.co/production/uploads/66c6048d0bf40704e4159a23/2EUWmy9YzOM4eHft6E04y.png
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
Monitoring made Easy with Computer Vision
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
- **Frontend**: Vanilla HTML/JS, TailwindCSS CDN, Chart.js
|
| 23 |
-
- **Infra**: Docker, CPU-only inference
|
| 24 |
|
| 25 |
-
|
| 26 |
-
save tokens in .env
|
| 27 |
-
```bash
|
| 28 |
-
HF_TOKEN=hf_xxxxx...
|
| 29 |
-
```
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
docker run -p 7860:7860 --env-file .env urbanflow
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
-
pip install -r requirements.txt
|
| 43 |
-
python backend/server.py
|
| 44 |
-
```
|
| 45 |
-
|
| 46 |
-
## Flow
|
| 47 |
-
|
| 48 |
-
1. Select Traffic Analytics module
|
| 49 |
-
2. Upload video file
|
| 50 |
-
3. System auto-calculates optimal inference settings (adjustable)
|
| 51 |
-
4. Draw counting line on first frame
|
| 52 |
-
5. Engine processes frames, dashboard updates in real time
|
| 53 |
-
6. View run details and live analytics
|
|
|
|
| 6 |
sdk: docker
|
| 7 |
pinned: true
|
| 8 |
license: apache-2.0
|
| 9 |
+
short_description: High performance, cloud native perception engine
|
| 10 |
thumbnail: >-
|
| 11 |
https://cdn-uploads.huggingface.co/production/uploads/66c6048d0bf40704e4159a23/2EUWmy9YzOM4eHft6E04y.png
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Perception365: UrbanFlow
|
|
|
|
| 15 |
|
| 16 |
+
Welcome to the official repository for **UrbanFlow** — a high-performance, cloud-native perception engine engineered for the complexities of modern urban mobility and traffic intelligence.
|
| 17 |
|
| 18 |
+
> Transforming raw visual data into institutional-grade actionable insights.
|
| 19 |
|
| 20 |
+
The gap between curated benchmarks and operational reality is where most vision systems fail. Generic datasets often overlook the chaotic density, extreme occlusion, and heterogeneous vehicle mix of real-world urban intersections.
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
**UrbanFlow** is designed to bridge this gap.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
### Strategic Vision
|
| 25 |
+
We focus on **production-grade cloud inference**, moving beyond the constraints and maintenance overhead of hardware-locked edge devices. By leveraging scalable cloud architectures, UrbanFlow delivers high-throughput analytics and sub-pixel tracking accuracy for transport authorities and smart city planners.
|
|
|
|
| 26 |
|
| 27 |
+
### Core Capabilities
|
| 28 |
+
* **Precision Class Detection**: Optimized for 14+ vehicle classes including those unique to the Indian road environment.
|
| 29 |
+
* **Institutional Metrics**: Native support for PCU analysis (Passenger Car Units) aligned with IRC:106-1990 standards.
|
| 30 |
+
* **Temporal Flow Tracking**: Advanced pixel-displacement speed profiling and temporal congestion mapping.
|
| 31 |
+
* **Enterprise Interoperability**: Structured JSON/CSV telemetry designed for direct integration with Transport Management Systems (TMS).
|
| 32 |
|
| 33 |
+
### Our Methodology
|
| 34 |
+
Each model in the UrbanFlow ecosystem is validated against raw, uncontrolled urban and highway footage. We prioritize:
|
| 35 |
+
- **Resilience**: Robust tracking through dense traffic saturation and adverse lighting.
|
| 36 |
+
- **Scalability**: High-performance inference pipelines that scale with institutional demand.
|
| 37 |
+
- **Integrity**: Gated access for verified researchers and planning authorities to ensure methodological rigor.
|
| 38 |
|
| 39 |
+
Perception is the foundation of the modern smart city.
|
| 40 |
+
We are building the intelligence layer that makes urban flow actionable.
|
| 41 |
|
| 42 |
+
**Built for Precision. Optimized for the Cloud.**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frontend/vehicles.html
CHANGED
|
@@ -442,6 +442,24 @@
|
|
| 442 |
color: #fff;
|
| 443 |
box-shadow: 0 0 15px rgba(200, 154, 108, 0.15);
|
| 444 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 445 |
</style>
|
| 446 |
</head>
|
| 447 |
|
|
@@ -1125,8 +1143,8 @@
|
|
| 1125 |
|
| 1126 |
<!-- TAB: Feedback -->
|
| 1127 |
<div id="tab-feedback" class="hidden flex-1 min-h-0 overflow-y-auto" style="padding:24px">
|
| 1128 |
-
<div class="
|
| 1129 |
-
<div class="bg-black border border-slate-800 rounded-2xl p-10 shadow-2xl space-y-10">
|
| 1130 |
<div class="text-center space-y-3">
|
| 1131 |
<h2 class="text-2xl font-bold tracking-tight" style="color:#f0ece6">Share Your Feedback</h2>
|
| 1132 |
<p class="text-xs" style="color:#777">We are actively refining UrbanFlow. Your technical insights directly drive our roadmap.</p>
|
|
@@ -1149,17 +1167,44 @@
|
|
| 1149 |
<span class="fb-star" data-v="5" onclick="setRating(5)">★</span>
|
| 1150 |
</div>
|
| 1151 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1153 |
<div>
|
| 1154 |
-
<label class="text-[10px] font-bold uppercase tracking-widest block mb-3" style="color:#a89f97">
|
| 1155 |
-
<
|
| 1156 |
-
<
|
| 1157 |
-
<
|
| 1158 |
-
<
|
| 1159 |
-
<
|
| 1160 |
-
|
| 1161 |
-
<option value="other">Other Institutional</option>
|
| 1162 |
-
</select>
|
| 1163 |
</div>
|
| 1164 |
</div>
|
| 1165 |
|
|
@@ -1332,12 +1377,29 @@
|
|
| 1332 |
|
| 1333 |
// =========== Feedback ===========
|
| 1334 |
let _fbRating = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1335 |
function setRating(n) {
|
| 1336 |
_fbRating = n;
|
| 1337 |
document.querySelectorAll('.fb-star').forEach(s => {
|
| 1338 |
s.classList.toggle('active', parseInt(s.dataset.v) <= n);
|
| 1339 |
});
|
| 1340 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1341 |
async function submitFeedback() {
|
| 1342 |
const type = document.getElementById('fb-type').value;
|
| 1343 |
const text = document.getElementById('fb-text').value.trim();
|
|
@@ -1348,13 +1410,14 @@
|
|
| 1348 |
priorities.push(c.getAttribute('data-val'));
|
| 1349 |
});
|
| 1350 |
|
| 1351 |
-
if (!text && _fbRating === 0) {
|
| 1352 |
-
showToast("Please provide a rating
|
| 1353 |
return;
|
| 1354 |
}
|
| 1355 |
|
| 1356 |
const payload = {
|
| 1357 |
rating: _fbRating,
|
|
|
|
| 1358 |
type: type,
|
| 1359 |
usecase: usecase,
|
| 1360 |
priorities: priorities,
|
|
@@ -1370,6 +1433,14 @@
|
|
| 1370 |
showToast('Thank you for your feedback!', 'success');
|
| 1371 |
document.getElementById('fb-text').value = '';
|
| 1372 |
document.querySelectorAll('#fb-priorities .fb-chip').forEach(c => c.classList.remove('active'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1373 |
_fbRating = 0;
|
| 1374 |
setRating(0);
|
| 1375 |
} else {
|
|
@@ -2057,6 +2128,16 @@
|
|
| 2057 |
adToggle.style.pointerEvents = 'none';
|
| 2058 |
adToggle.style.opacity = '0.4';
|
| 2059 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2060 |
|
| 2061 |
// Show New Analysis button in Settings
|
| 2062 |
const newWrap = document.getElementById('new-analysis-wrap');
|
|
|
|
| 442 |
color: #fff;
|
| 443 |
box-shadow: 0 0 15px rgba(200, 154, 108, 0.15);
|
| 444 |
}
|
| 445 |
+
.fb-emoji-btn {
|
| 446 |
+
background: #111;
|
| 447 |
+
border: 1px solid #2a2a2a;
|
| 448 |
+
border-radius: 8px;
|
| 449 |
+
color: #555;
|
| 450 |
+
flex: 1;
|
| 451 |
+
text-align: center;
|
| 452 |
+
padding: 10px 4px;
|
| 453 |
+
cursor: pointer;
|
| 454 |
+
transition: all 0.2s ease;
|
| 455 |
+
}
|
| 456 |
+
.fb-emoji-btn:hover { border-color: #444; color: #888; }
|
| 457 |
+
.fb-emoji-btn.active {
|
| 458 |
+
border-color: var(--cocoa-l);
|
| 459 |
+
background: #1a1a1a;
|
| 460 |
+
color: var(--cocoa-l);
|
| 461 |
+
box-shadow: 0 0 15px rgba(200, 154, 108, 0.15);
|
| 462 |
+
}
|
| 463 |
</style>
|
| 464 |
</head>
|
| 465 |
|
|
|
|
| 1143 |
|
| 1144 |
<!-- TAB: Feedback -->
|
| 1145 |
<div id="tab-feedback" class="hidden flex-1 min-h-0 overflow-y-auto" style="padding:24px">
|
| 1146 |
+
<div class="w-full h-full">
|
| 1147 |
+
<div class="bg-black border border-slate-800 rounded-2xl p-10 shadow-2xl space-y-10 min-h-full">
|
| 1148 |
<div class="text-center space-y-3">
|
| 1149 |
<h2 class="text-2xl font-bold tracking-tight" style="color:#f0ece6">Share Your Feedback</h2>
|
| 1150 |
<p class="text-xs" style="color:#777">We are actively refining UrbanFlow. Your technical insights directly drive our roadmap.</p>
|
|
|
|
| 1167 |
<span class="fb-star" data-v="5" onclick="setRating(5)">★</span>
|
| 1168 |
</div>
|
| 1169 |
</div>
|
| 1170 |
+
<div>
|
| 1171 |
+
<label class="text-[10px] font-bold uppercase tracking-widest block mb-3" style="color:#a89f97">Recommend Product</label>
|
| 1172 |
+
<div class="flex gap-2" id="fb-recommend">
|
| 1173 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-recommend', 'Unlikely')"><i class="fa-solid fa-face-frown text-xl"></i><span class="block mt-1 text-[8px] uppercase">Unlikely</span></div>
|
| 1174 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-recommend', 'Maybe')"><i class="fa-solid fa-face-meh text-xl"></i><span class="block mt-1 text-[8px] uppercase">Maybe</span></div>
|
| 1175 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-recommend', 'Likely')"><i class="fa-solid fa-face-smile text-xl"></i><span class="block mt-1 text-[8px] uppercase">Likely</span></div>
|
| 1176 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-recommend', 'Highly')"><i class="fa-solid fa-face-grin-stars text-xl"></i><span class="block mt-1 text-[8px] uppercase">Highly</span></div>
|
| 1177 |
+
</div>
|
| 1178 |
+
</div>
|
| 1179 |
+
</div>
|
| 1180 |
|
| 1181 |
+
<div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
|
| 1182 |
+
<div>
|
| 1183 |
+
<label class="text-[10px] font-bold uppercase tracking-widest block mb-3" style="color:#a89f97">Security</label>
|
| 1184 |
+
<div class="flex gap-2" id="fb-security">
|
| 1185 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-security', 'Poor')"><i class="fa-solid fa-face-frown text-lg"></i></div>
|
| 1186 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-security', 'Fair')"><i class="fa-solid fa-face-meh text-lg"></i></div>
|
| 1187 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-security', 'Good')"><i class="fa-solid fa-face-smile text-lg"></i></div>
|
| 1188 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-security', 'Great')"><i class="fa-solid fa-face-grin-stars text-lg"></i></div>
|
| 1189 |
+
</div>
|
| 1190 |
+
</div>
|
| 1191 |
+
<div>
|
| 1192 |
+
<label class="text-[10px] font-bold uppercase tracking-widest block mb-3" style="color:#a89f97">Integrations</label>
|
| 1193 |
+
<div class="flex gap-2" id="fb-integration">
|
| 1194 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-integration', 'Poor')"><i class="fa-solid fa-face-frown text-lg"></i></div>
|
| 1195 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-integration', 'Fair')"><i class="fa-solid fa-face-meh text-lg"></i></div>
|
| 1196 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-integration', 'Good')"><i class="fa-solid fa-face-smile text-lg"></i></div>
|
| 1197 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-integration', 'Great')"><i class="fa-solid fa-face-grin-stars text-lg"></i></div>
|
| 1198 |
+
</div>
|
| 1199 |
+
</div>
|
| 1200 |
<div>
|
| 1201 |
+
<label class="text-[10px] font-bold uppercase tracking-widest block mb-3" style="color:#a89f97">Ease of Use</label>
|
| 1202 |
+
<div class="flex gap-2" id="fb-ease">
|
| 1203 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-ease', 'Poor')"><i class="fa-solid fa-face-frown text-lg"></i></div>
|
| 1204 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-ease', 'Fair')"><i class="fa-solid fa-face-meh text-lg"></i></div>
|
| 1205 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-ease', 'Good')"><i class="fa-solid fa-face-smile text-lg"></i></div>
|
| 1206 |
+
<div class="fb-emoji-btn" onclick="setEmoji(this, 'fb-ease', 'Great')"><i class="fa-solid fa-face-grin-stars text-lg"></i></div>
|
| 1207 |
+
</div>
|
|
|
|
|
|
|
| 1208 |
</div>
|
| 1209 |
</div>
|
| 1210 |
|
|
|
|
| 1377 |
|
| 1378 |
// =========== Feedback ===========
|
| 1379 |
let _fbRating = 0;
|
| 1380 |
+
let _fbEmojis = {
|
| 1381 |
+
'fb-recommend': null,
|
| 1382 |
+
'fb-security': null,
|
| 1383 |
+
'fb-integration': null,
|
| 1384 |
+
'fb-ease': null
|
| 1385 |
+
};
|
| 1386 |
+
|
| 1387 |
function setRating(n) {
|
| 1388 |
_fbRating = n;
|
| 1389 |
document.querySelectorAll('.fb-star').forEach(s => {
|
| 1390 |
s.classList.toggle('active', parseInt(s.dataset.v) <= n);
|
| 1391 |
});
|
| 1392 |
}
|
| 1393 |
+
|
| 1394 |
+
function setEmoji(el, qId, val) {
|
| 1395 |
+
_fbEmojis[qId] = val;
|
| 1396 |
+
const container = document.getElementById(qId);
|
| 1397 |
+
if (container) {
|
| 1398 |
+
container.querySelectorAll('.fb-emoji-btn').forEach(btn => btn.classList.remove('active'));
|
| 1399 |
+
}
|
| 1400 |
+
el.classList.add('active');
|
| 1401 |
+
}
|
| 1402 |
+
|
| 1403 |
async function submitFeedback() {
|
| 1404 |
const type = document.getElementById('fb-type').value;
|
| 1405 |
const text = document.getElementById('fb-text').value.trim();
|
|
|
|
| 1410 |
priorities.push(c.getAttribute('data-val'));
|
| 1411 |
});
|
| 1412 |
|
| 1413 |
+
if (!text && _fbRating === 0 && !_fbEmojis['fb-recommend'] && !_fbEmojis['fb-security'] && !_fbEmojis['fb-integration'] && !_fbEmojis['fb-ease']) {
|
| 1414 |
+
showToast("Please provide a rating, some emojis, or word feedback", "error");
|
| 1415 |
return;
|
| 1416 |
}
|
| 1417 |
|
| 1418 |
const payload = {
|
| 1419 |
rating: _fbRating,
|
| 1420 |
+
emojis: _fbEmojis,
|
| 1421 |
type: type,
|
| 1422 |
usecase: usecase,
|
| 1423 |
priorities: priorities,
|
|
|
|
| 1433 |
showToast('Thank you for your feedback!', 'success');
|
| 1434 |
document.getElementById('fb-text').value = '';
|
| 1435 |
document.querySelectorAll('#fb-priorities .fb-chip').forEach(c => c.classList.remove('active'));
|
| 1436 |
+
|
| 1437 |
+
// Reset Emojis
|
| 1438 |
+
Object.keys(_fbEmojis).forEach(k => {
|
| 1439 |
+
_fbEmojis[k] = null;
|
| 1440 |
+
const c = document.getElementById(k);
|
| 1441 |
+
if (c) c.querySelectorAll('.fb-emoji-btn').forEach(b => b.classList.remove('active'));
|
| 1442 |
+
});
|
| 1443 |
+
|
| 1444 |
_fbRating = 0;
|
| 1445 |
setRating(0);
|
| 1446 |
} else {
|
|
|
|
| 2128 |
adToggle.style.pointerEvents = 'none';
|
| 2129 |
adToggle.style.opacity = '0.4';
|
| 2130 |
}
|
| 2131 |
+
const jsonToggle = document.getElementById('sv-export-json');
|
| 2132 |
+
if (jsonToggle) {
|
| 2133 |
+
jsonToggle.style.pointerEvents = 'none';
|
| 2134 |
+
jsonToggle.style.opacity = '0.4';
|
| 2135 |
+
}
|
| 2136 |
+
const csvToggle = document.getElementById('sv-export-csv');
|
| 2137 |
+
if (csvToggle) {
|
| 2138 |
+
csvToggle.style.pointerEvents = 'none';
|
| 2139 |
+
csvToggle.style.opacity = '0.4';
|
| 2140 |
+
}
|
| 2141 |
|
| 2142 |
// Show New Analysis button in Settings
|
| 2143 |
const newWrap = document.getElementById('new-analysis-wrap');
|