File size: 2,117 Bytes
b338c44 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Faster R-CNN Object Detection</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f4f4f4;
padding: 20px;
}
h1 {
color: #333;
}
.container {
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
max-width: 600px;
margin: auto;
}
input[type="file"] {
margin: 20px 0;
}
.image-container {
margin-top: 20px;
}
img {
max-width: 100%;
border: 2px solid #ddd;
border-radius: 5px;
}
.btn {
display: inline-block;
padding: 10px 20px;
font-size: 16px;
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
border-radius: 5px;
margin-top: 10px;
}
.btn:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container">
<h1>Faster R-CNN Object Detection</h1>
<form action="/" method="post" enctype="multipart/form-data">
<input type="file" name="file" required>
<button type="submit" class="btn">Upload & Detect</button>
</form>
{% if uploaded_image %}
<div class="image-container">
<h2>Uploaded Image</h2>
<img src="{{ uploaded_image }}" alt="Uploaded Image">
</div>
{% endif %}
{% if result_image %}
<div class="image-container">
<h2>Detection Results</h2>
<img src="{{ result_image }}" alt="Detected Image">
</div>
{% endif %}
</div>
</body>
</html>
|