-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui2.html
More file actions
114 lines (98 loc) · 3.09 KB
/
ui2.html
File metadata and controls
114 lines (98 loc) · 3.09 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>YOLOv11 Motion Detection</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
background-color: #121212;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #fff;
margin: 0;
padding: 0;
}
header {
background-color: #000;
text-align: center;
padding: 20px 0;
}
h1 {
margin: 0;
font-size: 2rem;
}
.controls, .upload-form {
text-align: center;
margin: 30px 0;
}
.btnCustom, .upload-form button {
background-color: #00bcd4;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 12px;
font-weight: bold;
cursor: pointer;
margin: 0 10px;
transition: background-color 0.3s ease;
}
.btnCustom:hover, .upload-form button:hover {
background-color: #0097a7;
}
.upload-form input[type="file"] {
padding: 10px;
border-radius: 10px;
border: 1px solid #ccc;
margin-right: 10px;
background-color: #fff;
color: #000;
}
.video-container {
display: flex;
justify-content: center;
align-items: center;
margin-top: 30px;
}
.video-frame, video {
width: 900px;
height: 600px;
border-radius: 20px;
object-fit: contain;
background-color: #000;
}
</style>
</head>
<body>
<header>
<h1><strong>YOLOv11 Motion Detection</strong></h1>
</header>
<div class="controls">
<button onclick="startWebcam()" class="btnCustom">Start Webcam</button>
<form action="/motion_video" method="GET" style="display:inline;">
<button type="submit" class="btnCustom">Start Motion Detection</button>
</form>
</div>
<div class="upload-form">
<form method="POST" action="/upload_video?type=motion" enctype="multipart/form-data">
<input type="file" name="video" accept="video/*" required>
<button type="submit">Upload Video</button>
</form>
</div>
<div class="video-container" id="webcam-container" style="display: none;">
<img id="webcam-stream" src="/start_webcam" class="video-frame" alt="Webcam Stream">
</div>
{% if video_url %}
<div class="video-container">
<video controls>
<source src="{{ video_url }}" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
{% endif %}
<script>
function startWebcam() {
document.getElementById('webcam-container').style.display = 'flex';
}
</script>
</body>
</html>