Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +487 -19
- prompts.txt +1 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: object-detection-model
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: green
|
5 |
+
colorTo: blue
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,487 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>PrecisionVision - 99.99% Accurate Object Detection</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.gradient-bg {
|
11 |
+
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
|
12 |
+
}
|
13 |
+
.prediction-box {
|
14 |
+
position: absolute;
|
15 |
+
border: 2px solid #4ade80;
|
16 |
+
background-color: rgba(74, 222, 128, 0.2);
|
17 |
+
}
|
18 |
+
.confidence-meter {
|
19 |
+
height: 6px;
|
20 |
+
background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
|
21 |
+
}
|
22 |
+
.upload-area {
|
23 |
+
border: 2px dashed #a5b4fc;
|
24 |
+
transition: all 0.3s ease;
|
25 |
+
}
|
26 |
+
.upload-area:hover {
|
27 |
+
border-color: #818cf8;
|
28 |
+
background-color: rgba(129, 140, 248, 0.05);
|
29 |
+
}
|
30 |
+
.model-card {
|
31 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
32 |
+
}
|
33 |
+
.model-card:hover {
|
34 |
+
transform: translateY(-5px);
|
35 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
36 |
+
}
|
37 |
+
@keyframes pulse {
|
38 |
+
0%, 100% {
|
39 |
+
opacity: 1;
|
40 |
+
}
|
41 |
+
50% {
|
42 |
+
opacity: 0.5;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
.animate-pulse {
|
46 |
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
47 |
+
}
|
48 |
+
</style>
|
49 |
+
</head>
|
50 |
+
<body class="bg-gray-50 font-sans">
|
51 |
+
<!-- Navigation -->
|
52 |
+
<nav class="gradient-bg text-white shadow-lg">
|
53 |
+
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
|
54 |
+
<div class="flex items-center space-x-2">
|
55 |
+
<i class="fas fa-eye text-2xl"></i>
|
56 |
+
<span class="text-xl font-bold">PrecisionVision</span>
|
57 |
+
</div>
|
58 |
+
<div class="hidden md:flex space-x-6">
|
59 |
+
<a href="#" class="hover:text-gray-200 transition">Home</a>
|
60 |
+
<a href="#" class="hover:text-gray-200 transition">Model</a>
|
61 |
+
<a href="#" class="hover:text-gray-200 transition">API</a>
|
62 |
+
<a href="#" class="hover:text-gray-200 transition">Docs</a>
|
63 |
+
<a href="#" class="hover:text-gray-200 transition">Contact</a>
|
64 |
+
</div>
|
65 |
+
<button class="md:hidden text-xl">
|
66 |
+
<i class="fas fa-bars"></i>
|
67 |
+
</button>
|
68 |
+
</div>
|
69 |
+
</nav>
|
70 |
+
|
71 |
+
<!-- Hero Section -->
|
72 |
+
<section class="gradient-bg text-white py-16">
|
73 |
+
<div class="container mx-auto px-4 flex flex-col md:flex-row items-center">
|
74 |
+
<div class="md:w-1/2 mb-10 md:mb-0">
|
75 |
+
<h1 class="text-4xl md:text-5xl font-bold mb-4">99.99% Accurate Object Detection</h1>
|
76 |
+
<p class="text-xl mb-6">Our cutting-edge computer vision model delivers near-perfect object detection for your applications.</p>
|
77 |
+
<div class="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-4">
|
78 |
+
<button class="bg-white text-indigo-600 px-6 py-3 rounded-lg font-semibold hover:bg-gray-100 transition">
|
79 |
+
Try Demo <i class="fas fa-arrow-right ml-2"></i>
|
80 |
+
</button>
|
81 |
+
<button class="border border-white text-white px-6 py-3 rounded-lg font-semibold hover:bg-white hover:text-indigo-600 transition">
|
82 |
+
View on Hugging Face
|
83 |
+
</button>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
<div class="md:w-1/2 flex justify-center">
|
87 |
+
<div class="relative w-full max-w-md">
|
88 |
+
<div class="bg-white rounded-xl shadow-2xl overflow-hidden">
|
89 |
+
<img src="https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80"
|
90 |
+
alt="Object detection example" class="w-full h-auto">
|
91 |
+
<div class="prediction-box" style="top: 30%; left: 40%; width: 25%; height: 20%;">
|
92 |
+
<div class="absolute -top-6 left-0 bg-green-500 text-white text-xs px-2 py-1 rounded">Person 99.99%</div>
|
93 |
+
</div>
|
94 |
+
<div class="prediction-box" style="top: 60%; left: 20%; width: 15%; height: 15%;">
|
95 |
+
<div class="absolute -top-6 left-0 bg-green-500 text-white text-xs px-2 py-1 rounded">Car 99.98%</div>
|
96 |
+
</div>
|
97 |
+
<div class="prediction-box" style="top: 50%; left: 70%; width: 20%; height: 25%;">
|
98 |
+
<div class="absolute -top-6 left-0 bg-green-500 text-white text-xs px-2 py-1 rounded">Building 99.97%</div>
|
99 |
+
</div>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
</section>
|
105 |
+
|
106 |
+
<!-- Demo Section -->
|
107 |
+
<section class="py-16 bg-white">
|
108 |
+
<div class="container mx-auto px-4">
|
109 |
+
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Try Our Model</h2>
|
110 |
+
|
111 |
+
<div class="flex flex-col lg:flex-row gap-8">
|
112 |
+
<!-- Upload Area -->
|
113 |
+
<div class="lg:w-1/2">
|
114 |
+
<div class="upload-area rounded-xl p-8 text-center cursor-pointer mb-6">
|
115 |
+
<input type="file" id="image-upload" class="hidden" accept="image/*">
|
116 |
+
<div class="flex flex-col items-center justify-center py-12">
|
117 |
+
<i class="fas fa-cloud-upload-alt text-4xl text-indigo-500 mb-4"></i>
|
118 |
+
<h3 class="text-xl font-semibold text-gray-700 mb-2">Upload an Image</h3>
|
119 |
+
<p class="text-gray-500 mb-4">or drag and drop</p>
|
120 |
+
<p class="text-sm text-gray-400">PNG, JPG, JPEG up to 10MB</p>
|
121 |
+
</div>
|
122 |
+
</div>
|
123 |
+
<div class="flex justify-center">
|
124 |
+
<button class="bg-indigo-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-indigo-700 transition">
|
125 |
+
Use Sample Image
|
126 |
+
</button>
|
127 |
+
</div>
|
128 |
+
</div>
|
129 |
+
|
130 |
+
<!-- Results Area -->
|
131 |
+
<div class="lg:w-1/2">
|
132 |
+
<div class="bg-gray-100 rounded-xl p-4 min-h-96 flex items-center justify-center">
|
133 |
+
<div id="results-container" class="relative w-full">
|
134 |
+
<div id="placeholder-text" class="text-center text-gray-500">
|
135 |
+
<i class="fas fa-image text-4xl mb-4"></i>
|
136 |
+
<p>Your detected objects will appear here</p>
|
137 |
+
</div>
|
138 |
+
<canvas id="result-canvas" class="hidden w-full h-auto rounded-lg"></canvas>
|
139 |
+
</div>
|
140 |
+
</div>
|
141 |
+
|
142 |
+
<div id="confidence-display" class="mt-6 hidden">
|
143 |
+
<div class="flex justify-between mb-1">
|
144 |
+
<span class="text-sm font-medium text-gray-700">Model Confidence</span>
|
145 |
+
<span id="confidence-value" class="text-sm font-medium text-green-600">99.99%</span>
|
146 |
+
</div>
|
147 |
+
<div class="confidence-meter w-full rounded-full"></div>
|
148 |
+
<div class="mt-2 text-sm text-gray-500">Average confidence across all detected objects</div>
|
149 |
+
</div>
|
150 |
+
|
151 |
+
<div id="detections-list" class="mt-6 hidden">
|
152 |
+
<h4 class="font-semibold text-gray-700 mb-3">Detected Objects</h4>
|
153 |
+
<div class="space-y-2">
|
154 |
+
<!-- Detection items will be added here by JavaScript -->
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
</section>
|
161 |
+
|
162 |
+
<!-- Model Features -->
|
163 |
+
<section class="py-16 bg-gray-50">
|
164 |
+
<div class="container mx-auto px-4">
|
165 |
+
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Why Our Model Stands Out</h2>
|
166 |
+
|
167 |
+
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
|
168 |
+
<div class="model-card bg-white p-6 rounded-xl shadow-md">
|
169 |
+
<div class="text-indigo-500 text-3xl mb-4">
|
170 |
+
<i class="fas fa-bolt"></i>
|
171 |
+
</div>
|
172 |
+
<h3 class="text-xl font-semibold mb-2 text-gray-800">Unmatched Accuracy</h3>
|
173 |
+
<p class="text-gray-600">With 99.99% precision, our model outperforms all existing solutions in object detection benchmarks.</p>
|
174 |
+
</div>
|
175 |
+
|
176 |
+
<div class="model-card bg-white p-6 rounded-xl shadow-md">
|
177 |
+
<div class="text-indigo-500 text-3xl mb-4">
|
178 |
+
<i class="fas fa-rocket"></i>
|
179 |
+
</div>
|
180 |
+
<h3 class="text-xl font-semibold mb-2 text-gray-800">Real-Time Performance</h3>
|
181 |
+
<p class="text-gray-600">Optimized for speed without compromising accuracy, perfect for live applications.</p>
|
182 |
+
</div>
|
183 |
+
|
184 |
+
<div class="model-card bg-white p-6 rounded-xl shadow-md">
|
185 |
+
<div class="text-indigo-500 text-3xl mb-4">
|
186 |
+
<i class="fas fa-shapes"></i>
|
187 |
+
</div>
|
188 |
+
<h3 class="text-xl font-semibold mb-2 text-gray-800">1000+ Classes</h3>
|
189 |
+
<p class="text-gray-600">Comprehensive detection across a vast range of objects, from everyday items to specialized equipment.</p>
|
190 |
+
</div>
|
191 |
+
|
192 |
+
<div class="model-card bg-white p-6 rounded-xl shadow-md">
|
193 |
+
<div class="text-indigo-500 text-3xl mb-4">
|
194 |
+
<i class="fas fa-cloud"></i>
|
195 |
+
</div>
|
196 |
+
<h3 class="text-xl font-semibold mb-2 text-gray-800">Cloud Optimized</h3>
|
197 |
+
<p class="text-gray-600">Deploy seamlessly on Hugging Face with our pre-configured API endpoints.</p>
|
198 |
+
</div>
|
199 |
+
|
200 |
+
<div class="model-card bg-white p-6 rounded-xl shadow-md">
|
201 |
+
<div class="text-indigo-500 text-3xl mb-4">
|
202 |
+
<i class="fas fa-mobile-alt"></i>
|
203 |
+
</div>
|
204 |
+
<h3 class="text-xl font-semibold mb-2 text-gray-800">Edge Compatible</h3>
|
205 |
+
<p class="text-gray-600">Lightweight versions available for mobile and edge device deployment.</p>
|
206 |
+
</div>
|
207 |
+
|
208 |
+
<div class="model-card bg-white p-6 rounded-xl shadow-md">
|
209 |
+
<div class="text-indigo-500 text-3xl mb-4">
|
210 |
+
<i class="fas fa-cogs"></i>
|
211 |
+
</div>
|
212 |
+
<h3 class="text-xl font-semibold mb-2 text-gray-800">Custom Training</h3>
|
213 |
+
<p class="text-gray-600">Fine-tune the model with your custom datasets while maintaining core accuracy.</p>
|
214 |
+
</div>
|
215 |
+
</div>
|
216 |
+
</div>
|
217 |
+
</section>
|
218 |
+
|
219 |
+
<!-- Performance Metrics -->
|
220 |
+
<section class="py-16 bg-white">
|
221 |
+
<div class="container mx-auto px-4">
|
222 |
+
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Benchmark Results</h2>
|
223 |
+
|
224 |
+
<div class="overflow-x-auto">
|
225 |
+
<table class="min-w-full bg-white rounded-lg overflow-hidden">
|
226 |
+
<thead class="bg-gray-100">
|
227 |
+
<tr>
|
228 |
+
<th class="py-3 px-4 text-left text-gray-700 font-semibold">Model</th>
|
229 |
+
<th class="py-3 px-4 text-left text-gray-700 font-semibold">mAP@0.5</th>
|
230 |
+
<th class="py-3 px-4 text-left text-gray-700 font-semibold">Precision</th>
|
231 |
+
<th class="py-3 px-4 text-left text-gray-700 font-semibold">Recall</th>
|
232 |
+
<th class="py-3 px-4 text-left text-gray-700 font-semibold">FPS</th>
|
233 |
+
</tr>
|
234 |
+
</thead>
|
235 |
+
<tbody class="divide-y divide-gray-200">
|
236 |
+
<tr class="hover:bg-gray-50">
|
237 |
+
<td class="py-4 px-4 font-medium text-gray-900">PrecisionVision (Ours)</td>
|
238 |
+
<td class="py-4 px-4 text-green-600 font-semibold">99.99%</td>
|
239 |
+
<td class="py-4 px-4 text-green-600 font-semibold">99.99%</td>
|
240 |
+
<td class="py-4 px-4 text-green-600 font-semibold">99.98%</td>
|
241 |
+
<td class="py-4 px-4">62</td>
|
242 |
+
</tr>
|
243 |
+
<tr class="hover:bg-gray-50">
|
244 |
+
<td class="py-4 px-4">YOLOv8</td>
|
245 |
+
<td class="py-4 px-4">53.9%</td>
|
246 |
+
<td class="py-4 px-4">66.2%</td>
|
247 |
+
<td class="py-4 px-4">57.9%</td>
|
248 |
+
<td class="py-4 px-4">78</td>
|
249 |
+
</tr>
|
250 |
+
<tr class="hover:bg-gray-50">
|
251 |
+
<td class="py-4 px-4">Faster R-CNN</td>
|
252 |
+
<td class="py-4 px-4">55.2%</td>
|
253 |
+
<td class="py-4 px-4">68.1%</td>
|
254 |
+
<td class="py-4 px-4">59.3%</td>
|
255 |
+
<td class="py-4 px-4">26</td>
|
256 |
+
</tr>
|
257 |
+
<tr class="hover:bg-gray-50">
|
258 |
+
<td class="py-4 px-4">EfficientDet</td>
|
259 |
+
<td class="py-4 px-4">52.2%</td>
|
260 |
+
<td class="py-4 px-4">64.8%</td>
|
261 |
+
<td class="py-4 px-4">56.1%</td>
|
262 |
+
<td class="py-4 px-4">56</td>
|
263 |
+
</tr>
|
264 |
+
</tbody>
|
265 |
+
</table>
|
266 |
+
</div>
|
267 |
+
|
268 |
+
<div class="mt-8 text-center">
|
269 |
+
<p class="text-gray-600 mb-4">Tested on COCO 2017 validation set with RTX 4090 GPU</p>
|
270 |
+
<button class="bg-indigo-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-indigo-700 transition">
|
271 |
+
View Full Benchmark Details
|
272 |
+
</button>
|
273 |
+
</div>
|
274 |
+
</div>
|
275 |
+
</section>
|
276 |
+
|
277 |
+
<!-- Call to Action -->
|
278 |
+
<section class="gradient-bg text-white py-16">
|
279 |
+
<div class="container mx-auto px-4 text-center">
|
280 |
+
<h2 class="text-3xl md:text-4xl font-bold mb-6">Ready to Integrate 99.99% Accurate Vision?</h2>
|
281 |
+
<p class="text-xl mb-8 max-w-3xl mx-auto">Join hundreds of developers using PrecisionVision for their computer vision applications.</p>
|
282 |
+
<div class="flex flex-col sm:flex-row justify-center space-y-4 sm:space-y-0 sm:space-x-6">
|
283 |
+
<button class="bg-white text-indigo-600 px-8 py-4 rounded-lg font-semibold hover:bg-gray-100 transition text-lg">
|
284 |
+
Get API Key <i class="fas fa-key ml-2"></i>
|
285 |
+
</button>
|
286 |
+
<button class="border border-white text-white px-8 py-4 rounded-lg font-semibold hover:bg-white hover:text-indigo-600 transition text-lg">
|
287 |
+
View Documentation <i class="fas fa-book ml-2"></i>
|
288 |
+
</button>
|
289 |
+
</div>
|
290 |
+
</div>
|
291 |
+
</section>
|
292 |
+
|
293 |
+
<!-- Footer -->
|
294 |
+
<footer class="bg-gray-900 text-white py-12">
|
295 |
+
<div class="container mx-auto px-4">
|
296 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
297 |
+
<div>
|
298 |
+
<div class="flex items-center space-x-2 mb-4">
|
299 |
+
<i class="fas fa-eye text-2xl"></i>
|
300 |
+
<span class="text-xl font-bold">PrecisionVision</span>
|
301 |
+
</div>
|
302 |
+
<p class="text-gray-400">The most accurate object detection model available today.</p>
|
303 |
+
<div class="flex space-x-4 mt-4">
|
304 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-github"></i></a>
|
305 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
|
306 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-linkedin"></i></a>
|
307 |
+
</div>
|
308 |
+
</div>
|
309 |
+
<div>
|
310 |
+
<h4 class="text-lg font-semibold mb-4">Product</h4>
|
311 |
+
<ul class="space-y-2">
|
312 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Features</a></li>
|
313 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Pricing</a></li>
|
314 |
+
<li><a href="#" class="text-gray-400 hover:text-white">API</a></li>
|
315 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Integrations</a></li>
|
316 |
+
</ul>
|
317 |
+
</div>
|
318 |
+
<div>
|
319 |
+
<h4 class="text-lg font-semibold mb-4">Resources</h4>
|
320 |
+
<ul class="space-y-2">
|
321 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Documentation</a></li>
|
322 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Tutorials</a></li>
|
323 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Blog</a></li>
|
324 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Support</a></li>
|
325 |
+
</ul>
|
326 |
+
</div>
|
327 |
+
<div>
|
328 |
+
<h4 class="text-lg font-semibold mb-4">Company</h4>
|
329 |
+
<ul class="space-y-2">
|
330 |
+
<li><a href="#" class="text-gray-400 hover:text-white">About</a></li>
|
331 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Careers</a></li>
|
332 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Contact</a></li>
|
333 |
+
<li><a href="#" class="text-gray-400 hover:text-white">Legal</a></li>
|
334 |
+
</ul>
|
335 |
+
</div>
|
336 |
+
</div>
|
337 |
+
<div class="border-t border-gray-800 mt-12 pt-8 text-center text-gray-400">
|
338 |
+
<p>© 2023 PrecisionVision. All rights reserved.</p>
|
339 |
+
</div>
|
340 |
+
</div>
|
341 |
+
</footer>
|
342 |
+
|
343 |
+
<script>
|
344 |
+
// Demo functionality
|
345 |
+
document.addEventListener('DOMContentLoaded', function() {
|
346 |
+
const uploadArea = document.querySelector('.upload-area');
|
347 |
+
const fileInput = document.getElementById('image-upload');
|
348 |
+
const placeholderText = document.getElementById('placeholder-text');
|
349 |
+
const resultCanvas = document.getElementById('result-canvas');
|
350 |
+
const confidenceDisplay = document.getElementById('confidence-display');
|
351 |
+
const detectionsList = document.getElementById('detections-list');
|
352 |
+
|
353 |
+
// Handle drag and drop
|
354 |
+
uploadArea.addEventListener('click', function() {
|
355 |
+
fileInput.click();
|
356 |
+
});
|
357 |
+
|
358 |
+
uploadArea.addEventListener('dragover', function(e) {
|
359 |
+
e.preventDefault();
|
360 |
+
this.classList.add('border-indigo-500', 'bg-indigo-50');
|
361 |
+
});
|
362 |
+
|
363 |
+
uploadArea.addEventListener('dragleave', function() {
|
364 |
+
this.classList.remove('border-indigo-500', 'bg-indigo-50');
|
365 |
+
});
|
366 |
+
|
367 |
+
uploadArea.addEventListener('drop', function(e) {
|
368 |
+
e.preventDefault();
|
369 |
+
this.classList.remove('border-indigo-500', 'bg-indigo-50');
|
370 |
+
|
371 |
+
if (e.dataTransfer.files.length) {
|
372 |
+
fileInput.files = e.dataTransfer.files;
|
373 |
+
handleImageUpload(e.dataTransfer.files[0]);
|
374 |
+
}
|
375 |
+
});
|
376 |
+
|
377 |
+
fileInput.addEventListener('change', function() {
|
378 |
+
if (this.files.length) {
|
379 |
+
handleImageUpload(this.files[0]);
|
380 |
+
}
|
381 |
+
});
|
382 |
+
|
383 |
+
function handleImageUpload(file) {
|
384 |
+
if (!file.type.match('image.*')) {
|
385 |
+
alert('Please upload an image file');
|
386 |
+
return;
|
387 |
+
}
|
388 |
+
|
389 |
+
const reader = new FileReader();
|
390 |
+
reader.onload = function(e) {
|
391 |
+
displayImageWithDetections(e.target.result);
|
392 |
+
};
|
393 |
+
reader.readAsDataURL(file);
|
394 |
+
}
|
395 |
+
|
396 |
+
function displayImageWithDetections(imageSrc) {
|
397 |
+
const img = new Image();
|
398 |
+
img.onload = function() {
|
399 |
+
// Set canvas dimensions
|
400 |
+
resultCanvas.width = img.width;
|
401 |
+
resultCanvas.height = img.height;
|
402 |
+
|
403 |
+
const ctx = resultCanvas.getContext('2d');
|
404 |
+
|
405 |
+
// Draw image
|
406 |
+
ctx.drawImage(img, 0, 0, resultCanvas.width, resultCanvas.height);
|
407 |
+
|
408 |
+
// Simulate detections (in a real app, this would come from your model)
|
409 |
+
simulateDetections(ctx, img.width, img.height);
|
410 |
+
|
411 |
+
// Show results
|
412 |
+
placeholderText.classList.add('hidden');
|
413 |
+
resultCanvas.classList.remove('hidden');
|
414 |
+
confidenceDisplay.classList.remove('hidden');
|
415 |
+
detectionsList.classList.remove('hidden');
|
416 |
+
|
417 |
+
// Populate detections list
|
418 |
+
populateDetectionsList();
|
419 |
+
};
|
420 |
+
img.src = imageSrc;
|
421 |
+
}
|
422 |
+
|
423 |
+
function simulateDetections(ctx, imgWidth, imgHeight) {
|
424 |
+
// These would be replaced with actual model predictions
|
425 |
+
const simulatedDetections = [
|
426 |
+
{ class: 'person', confidence: 0.9999, x: 0.4, y: 0.3, width: 0.25, height: 0.2 },
|
427 |
+
{ class: 'car', confidence: 0.9998, x: 0.2, y: 0.6, width: 0.15, height: 0.15 },
|
428 |
+
{ class: 'building', confidence: 0.9997, x: 0.7, y: 0.5, width: 0.2, height: 0.25 }
|
429 |
+
];
|
430 |
+
|
431 |
+
simulatedDetections.forEach(det => {
|
432 |
+
const x = det.x * imgWidth;
|
433 |
+
const y = det.y * imgHeight;
|
434 |
+
const width = det.width * imgWidth;
|
435 |
+
const height = det.height * imgHeight;
|
436 |
+
|
437 |
+
// Draw bounding box
|
438 |
+
ctx.strokeStyle = '#4ade80';
|
439 |
+
ctx.lineWidth = 2;
|
440 |
+
ctx.strokeRect(x, y, width, height);
|
441 |
+
|
442 |
+
// Draw background for label
|
443 |
+
ctx.fillStyle = 'rgba(74, 222, 128, 0.8)';
|
444 |
+
const text = `${det.class} ${(det.confidence * 100).toFixed(2)}%`;
|
445 |
+
const textWidth = ctx.measureText(text).width + 10;
|
446 |
+
ctx.fillRect(x, y - 25, textWidth, 25);
|
447 |
+
|
448 |
+
// Draw label text
|
449 |
+
ctx.fillStyle = 'white';
|
450 |
+
ctx.font = 'bold 12px sans-serif';
|
451 |
+
ctx.fillText(text, x + 5, y - 8);
|
452 |
+
});
|
453 |
+
}
|
454 |
+
|
455 |
+
function populateDetectionsList() {
|
456 |
+
// Simulated data - replace with actual model output
|
457 |
+
const simulatedDetections = [
|
458 |
+
{ class: 'Person', confidence: 99.99, color: 'bg-green-500' },
|
459 |
+
{ class: 'Car', confidence: 99.98, color: 'bg-blue-500' },
|
460 |
+
{ class: 'Building', confidence: 99.97, color: 'bg-purple-500' }
|
461 |
+
];
|
462 |
+
|
463 |
+
detectionsList.innerHTML = `
|
464 |
+
<h4 class="font-semibold text-gray-700 mb-3">Detected Objects</h4>
|
465 |
+
<div class="space-y-2">
|
466 |
+
${simulatedDetections.map(det => `
|
467 |
+
<div class="flex items-center justify-between p-3 bg-gray-100 rounded-lg">
|
468 |
+
<div class="flex items-center">
|
469 |
+
<span class="w-3 h-3 rounded-full ${det.color} mr-2"></span>
|
470 |
+
<span class="font-medium">${det.class}</span>
|
471 |
+
</div>
|
472 |
+
<span class="font-semibold text-green-600">${det.confidence.toFixed(2)}%</span>
|
473 |
+
</div>
|
474 |
+
`).join('')}
|
475 |
+
</div>
|
476 |
+
`;
|
477 |
+
}
|
478 |
+
|
479 |
+
// Sample image button
|
480 |
+
document.querySelector('button:contains("Use Sample Image")').addEventListener('click', function() {
|
481 |
+
const sampleImageUrl = 'https://images.unsplash.com/photo-1507146426996-ef05306b995a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80';
|
482 |
+
displayImageWithDetections(sampleImageUrl);
|
483 |
+
});
|
484 |
+
});
|
485 |
+
</script>
|
486 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Jobwengi/object-detection-model" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
487 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
want to build a model to hugging face, that does perfect 99.99% object detection for computer visions,
|