Implemented all css in single

This commit is contained in:
sumona-banerjeee
2026-02-12 10:43:21 +05:30
parent 12b6a99531
commit 53cc7f6a4f
13 changed files with 343 additions and 343 deletions

View File

@@ -167,7 +167,7 @@ export async function fetchAllLocations(): Promise<Location[]> {
export interface Video {
id: string
filename: string
detection_type: "pothole-detection" | "sign-board-detection"
detection_type: "pothole-detection" | "sign-board-detection" | "pot-sign-detection"
status: "pending" | "processing" | "completed" | "failed"
unique_potholes?: number
unique_signboards?: number
@@ -186,7 +186,7 @@ export async function fetchVideos(): Promise<Video[]> {
return response.videos.map(v => ({
id: v.video_id,
filename: v.video_id, // Using video_id as filename since backend doesn't provide it
detection_type: v.summary?.unique_potholes !== undefined ? "pothole-detection" : "sign-board-detection" as const,
detection_type: (v.summary?.unique_potholes !== undefined && v.summary?.unique_signboards !== undefined) ? "pot-sign-detection" as const : v.summary?.unique_potholes !== undefined ? "pothole-detection" as const : "sign-board-detection" as const,
status: v.status as Video["status"],
unique_potholes: v.summary?.unique_potholes,
unique_signboards: v.summary?.unique_signboards,

View File

@@ -1,4 +1,4 @@
export type DetectionType = "pothole-detection" | "sign-board-detection"
export type DetectionType = "pothole-detection" | "sign-board-detection" | "pot-sign-detection"
export type DetectionData = {
video_id: string
@@ -18,44 +18,50 @@ export type DetectionData = {
detection_rate: number
}
pothole_list?: Array<{
pothole_id: number
pothole_id?: number
detection_id?: number
type?: string
first_detected_frame: number
first_detected_time: number
confidence: number
bbox?: { x1: number; y1: number; x2: number; y2: number }
lat?: number
lng?: number
}>
signboard_list?: Array<{
signboard_id: number
signboard_id?: number
detection_id?: number
type: string
first_detected_frame: number
first_detected_time: number
confidence: number
bbox?: { x1: number; y1: number; x2: number; y2: number }
lat?: number
lng?: number
}>
frames: Array<{
frame_id: number
// Legacy format: separate arrays
potholes?: Array<{
pothole_id: number
bbox: {
x1: number
y1: number
x2: number
y2: number
}
bbox: { x1: number; y1: number; x2: number; y2: number }
confidence: number
}>
signboards?: Array<{
signboard_id: number
type: string
bbox: {
x1: number
y1: number
x2: number
y2: number
}
bbox: { x1: number; y1: number; x2: number; y2: number }
confidence: number
}>
// Flat format (pot-sign-detection): unified detections array
detections?: Array<{
frame_id: number
detection_id: number
type: string
confidence: number
bbox: { x1: number; y1: number; x2: number; y2: number }
center?: { x: number; y: number }
area?: number
}>
}>
}