-
void refetchVideo()}
- onTimeUpdate={handleTimeUpdate}
- onSeeked={handleSeeked}
+
+
+
@@ -74,7 +71,7 @@ export default function VideoPlayerSection({ data }: VideoPlayerSectionProps) {
setSelectedLogId(log.id)}
/>
diff --git a/src/constants/defectVisualConfig.ts b/src/constants/defectVisualConfig.ts
index 3149b5f..18fde73 100644
--- a/src/constants/defectVisualConfig.ts
+++ b/src/constants/defectVisualConfig.ts
@@ -12,6 +12,7 @@ import {
type DefectVisualConfig = {
icon: LucideIcon;
+ boundingBoxColor: string;
colorClassName: string;
iconClassName: string;
cardClassName: string;
@@ -20,30 +21,35 @@ type DefectVisualConfig = {
const DEFECT_VISUALS: Record
= {
manhole_cover: {
icon: CircleDot,
+ boundingBoxColor: '#71717a',
colorClassName: 'text-zinc-500',
iconClassName: 'bg-zinc-500/10 text-zinc-500',
cardClassName: 'bg-zinc-500/5',
},
pothole: {
icon: Construction,
+ boundingBoxColor: '#f97316',
colorClassName: 'text-orange-500',
iconClassName: 'bg-orange-500/10 text-orange-500',
cardClassName: 'bg-orange-500/5',
},
road_crack: {
icon: Spline,
+ boundingBoxColor: '#f43f5e',
colorClassName: 'text-rose-500',
iconClassName: 'bg-rose-500/10 text-rose-500',
cardClassName: 'bg-rose-500/5',
},
sign_board: {
icon: SignpostBig,
+ boundingBoxColor: '#3b82f6',
colorClassName: 'text-blue-500',
iconClassName: 'bg-blue-500/10 text-blue-500',
cardClassName: 'bg-blue-500/5',
},
water_puddle: {
icon: Droplets,
+ boundingBoxColor: '#06b6d4',
colorClassName: 'text-cyan-500',
iconClassName: 'bg-cyan-500/10 text-cyan-500',
cardClassName: 'bg-cyan-500/5',
@@ -52,6 +58,7 @@ const DEFECT_VISUALS: Record = {
const DEFAULT_VISUAL: DefectVisualConfig = {
icon: Activity,
+ boundingBoxColor: '#22c55e',
colorClassName: 'text-green-500',
iconClassName: 'bg-green-500/10 text-green-500',
cardClassName: 'bg-green-500/5',
diff --git a/src/types/analysis.ts b/src/types/analysis.ts
index 040cc3f..03c9e85 100644
--- a/src/types/analysis.ts
+++ b/src/types/analysis.ts
@@ -8,6 +8,8 @@ export type CompletedVideoResult = {
summary: {
fps: number;
duration_seconds: number;
+ video_width: number;
+ video_height: number;
total_detections: number;
};
defect_counts: DetectionClassCount[];
diff --git a/src/types/detection.ts b/src/types/detection.ts
index 5be2d8b..cc51430 100644
--- a/src/types/detection.ts
+++ b/src/types/detection.ts
@@ -5,6 +5,15 @@ export type DetectionClassCount = {
unique_count: number;
};
+export type DetectionBoundingBox = {
+ x1: number;
+ y1: number;
+ x2: number;
+ y2: number;
+ width: number;
+ height: number;
+};
+
export type DetectionResultLog = {
id: string;
detection: {
@@ -13,10 +22,13 @@ export type DetectionResultLog = {
display_name: string;
confidence: number;
context_image_url: string;
+ bounding_box: DetectionBoundingBox;
};
frame: {
number: number;
timestamp_seconds: number;
+ start_timestamp_seconds?: number;
+ end_timestamp_seconds?: number;
};
location: {
latitude: number | null;