Spaces:
Sleeping
Sleeping
Upload 79 files
Browse files- .gitattributes +4 -0
- app/__pycache__/config.cpython-312.pyc +0 -0
- app/__pycache__/utils.cpython-312.pyc +0 -0
- app/config.py +2 -1
- app/static/uploads/1b425124-6e71-4288-9c40-52d368c9031a.jpeg +0 -0
- app/static/uploads/5f2e6247-319d-466b-8ad8-1ead9328ff1f.jpeg +0 -0
- app/static/uploads/617ed55a-48f8-4289-ad1e-6b96f0bec2b5.jpg +3 -0
- app/static/uploads/6855ff73-d1cf-49aa-bd8f-40585acc6b4b.jpg +3 -0
- app/static/uploads/dfb9c349-92a7-4af1-b626-35dbb8f9f9c1.jpeg +0 -0
- app/static/uploads/processed_1b425124-6e71-4288-9c40-52d368c9031a.jpeg +0 -0
- app/static/uploads/processed_5f2e6247-319d-466b-8ad8-1ead9328ff1f.jpeg +0 -0
- app/static/uploads/processed_617ed55a-48f8-4289-ad1e-6b96f0bec2b5.jpg +3 -0
- app/static/uploads/processed_6855ff73-d1cf-49aa-bd8f-40585acc6b4b.jpg +3 -0
- app/static/uploads/processed_dfb9c349-92a7-4af1-b626-35dbb8f9f9c1.jpeg +0 -0
- app/templates/index.html +75 -67
- app/utils.py +4 -4
- models/cardd_model_info.json +9 -9
- models/cardd_yolo11s_1024_final.pt +3 -0
.gitattributes
CHANGED
|
@@ -67,3 +67,7 @@ app/static/uploads/processed_b3eb6e20-1637-4ae8-87ad-55f09ceb3f80.jpg filter=lfs
|
|
| 67 |
app/static/uploads/processed_c919d326-ca13-4105-a37d-cf61354f990a.jpg filter=lfs diff=lfs merge=lfs -text
|
| 68 |
app/static/uploads/processed_d1955d96-b974-44b0-a109-cb061564c33a.jpg filter=lfs diff=lfs merge=lfs -text
|
| 69 |
app/static/uploads/processed_e94a2d38-4a59-4f7e-b769-ba2e792c959d.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
app/static/uploads/processed_c919d326-ca13-4105-a37d-cf61354f990a.jpg filter=lfs diff=lfs merge=lfs -text
|
| 68 |
app/static/uploads/processed_d1955d96-b974-44b0-a109-cb061564c33a.jpg filter=lfs diff=lfs merge=lfs -text
|
| 69 |
app/static/uploads/processed_e94a2d38-4a59-4f7e-b769-ba2e792c959d.jpg filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
app/static/uploads/617ed55a-48f8-4289-ad1e-6b96f0bec2b5.jpg filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
app/static/uploads/6855ff73-d1cf-49aa-bd8f-40585acc6b4b.jpg filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
app/static/uploads/processed_617ed55a-48f8-4289-ad1e-6b96f0bec2b5.jpg filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
app/static/uploads/processed_6855ff73-d1cf-49aa-bd8f-40585acc6b4b.jpg filter=lfs diff=lfs merge=lfs -text
|
app/__pycache__/config.cpython-312.pyc
CHANGED
|
Binary files a/app/__pycache__/config.cpython-312.pyc and b/app/__pycache__/config.cpython-312.pyc differ
|
|
|
app/__pycache__/utils.cpython-312.pyc
CHANGED
|
Binary files a/app/__pycache__/utils.cpython-312.pyc and b/app/__pycache__/utils.cpython-312.pyc differ
|
|
|
app/config.py
CHANGED
|
@@ -5,7 +5,8 @@ from dotenv import load_dotenv
|
|
| 5 |
load_dotenv()
|
| 6 |
|
| 7 |
BASE_DIR = Path(__file__).resolve().parent.parent
|
| 8 |
-
MODEL_PATH = BASE_DIR / "models" / "
|
|
|
|
| 9 |
UPLOAD_DIR = BASE_DIR / "app" / "static" / "uploads"
|
| 10 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
|
| 11 |
|
|
|
|
| 5 |
load_dotenv()
|
| 6 |
|
| 7 |
BASE_DIR = Path(__file__).resolve().parent.parent
|
| 8 |
+
MODEL_PATH = BASE_DIR / "models" / "cardd_yolo11s_1024_final.pt"
|
| 9 |
+
MODEL_IMAGE_SIZE = 1024
|
| 10 |
UPLOAD_DIR = BASE_DIR / "app" / "static" / "uploads"
|
| 11 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
|
| 12 |
|
app/static/uploads/1b425124-6e71-4288-9c40-52d368c9031a.jpeg
ADDED
|
app/static/uploads/5f2e6247-319d-466b-8ad8-1ead9328ff1f.jpeg
ADDED
|
app/static/uploads/617ed55a-48f8-4289-ad1e-6b96f0bec2b5.jpg
ADDED
|
Git LFS Details
|
app/static/uploads/6855ff73-d1cf-49aa-bd8f-40585acc6b4b.jpg
ADDED
|
Git LFS Details
|
app/static/uploads/dfb9c349-92a7-4af1-b626-35dbb8f9f9c1.jpeg
ADDED
|
app/static/uploads/processed_1b425124-6e71-4288-9c40-52d368c9031a.jpeg
ADDED
|
app/static/uploads/processed_5f2e6247-319d-466b-8ad8-1ead9328ff1f.jpeg
ADDED
|
app/static/uploads/processed_617ed55a-48f8-4289-ad1e-6b96f0bec2b5.jpg
ADDED
|
Git LFS Details
|
app/static/uploads/processed_6855ff73-d1cf-49aa-bd8f-40585acc6b4b.jpg
ADDED
|
Git LFS Details
|
app/static/uploads/processed_dfb9c349-92a7-4af1-b626-35dbb8f9f9c1.jpeg
ADDED
|
app/templates/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
@@ -7,172 +7,170 @@
|
|
| 7 |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 8 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
| 9 |
<style>
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
body {
|
| 12 |
-
background-color: #
|
| 13 |
-
line-height: 1.
|
| 14 |
}
|
| 15 |
|
| 16 |
.container {
|
| 17 |
-
max-width:
|
| 18 |
-
padding:
|
| 19 |
}
|
| 20 |
|
| 21 |
-
/* Section spacing */
|
| 22 |
.section {
|
| 23 |
background: white;
|
| 24 |
border-radius: 12px;
|
| 25 |
-
padding:
|
| 26 |
-
margin-bottom:
|
| 27 |
-
box-shadow:
|
| 28 |
}
|
| 29 |
|
| 30 |
.section-title {
|
| 31 |
-
font-size: 1.
|
| 32 |
font-weight: 700;
|
| 33 |
-
margin-bottom:
|
| 34 |
-
padding-bottom:
|
| 35 |
-
border-bottom:
|
| 36 |
display: flex;
|
| 37 |
align-items: center;
|
| 38 |
gap: 10px;
|
| 39 |
}
|
| 40 |
|
| 41 |
-
/* Header spacing */
|
| 42 |
.header {
|
| 43 |
text-align: center;
|
| 44 |
-
padding:
|
| 45 |
background: white;
|
| 46 |
-
color: #
|
| 47 |
border-radius: 12px;
|
| 48 |
-
margin-bottom:
|
| 49 |
-
box-shadow:
|
| 50 |
}
|
| 51 |
|
| 52 |
.header h1 {
|
| 53 |
-
margin-bottom:
|
|
|
|
| 54 |
}
|
| 55 |
|
| 56 |
.header p {
|
| 57 |
-
margin-bottom:
|
| 58 |
-
|
| 59 |
}
|
| 60 |
|
| 61 |
-
/* Metrics card spacing */
|
| 62 |
.metric-card {
|
| 63 |
background: white;
|
| 64 |
border-radius: 12px;
|
| 65 |
-
padding:
|
| 66 |
text-align: center;
|
| 67 |
-
box-shadow:
|
| 68 |
-
margin-bottom:
|
| 69 |
-
transition: transform 0.
|
| 70 |
}
|
| 71 |
|
| 72 |
.metric-card:hover {
|
| 73 |
-
transform: translateY(-
|
| 74 |
}
|
| 75 |
|
| 76 |
.metric-card h2 {
|
| 77 |
-
font-size:
|
| 78 |
font-weight: 700;
|
| 79 |
-
margin:
|
| 80 |
}
|
| 81 |
|
| 82 |
.metric-card p {
|
| 83 |
margin: 0;
|
| 84 |
-
color:
|
| 85 |
font-size: 0.95rem;
|
| 86 |
}
|
| 87 |
|
| 88 |
-
/* Image spacing */
|
| 89 |
.image-container {
|
| 90 |
-
margin:
|
| 91 |
text-align: center;
|
| 92 |
}
|
| 93 |
|
| 94 |
.image-container img {
|
| 95 |
max-width: 100%;
|
| 96 |
-
max-height:
|
| 97 |
border-radius: 8px;
|
| 98 |
-
box-shadow: 0 4px 12px rgba(0,0,0,0.
|
| 99 |
object-fit: contain;
|
| 100 |
}
|
| 101 |
|
| 102 |
-
/* Table spacing */
|
| 103 |
.table {
|
| 104 |
-
margin-top:
|
| 105 |
margin-bottom: 0;
|
| 106 |
}
|
| 107 |
|
| 108 |
.table th {
|
| 109 |
-
background-color: #
|
| 110 |
font-weight: 600;
|
| 111 |
-
padding:
|
| 112 |
}
|
| 113 |
|
| 114 |
.table td {
|
| 115 |
-
padding:
|
| 116 |
vertical-align: middle;
|
| 117 |
}
|
| 118 |
|
| 119 |
-
/* List spacing */
|
| 120 |
.inspection-list {
|
| 121 |
list-style: none;
|
| 122 |
padding: 0;
|
| 123 |
}
|
| 124 |
|
| 125 |
.inspection-list li {
|
| 126 |
-
padding:
|
| 127 |
-
margin-bottom:
|
| 128 |
-
background: #
|
| 129 |
-
border-left: 4px solid
|
| 130 |
border-radius: 6px;
|
| 131 |
}
|
| 132 |
|
| 133 |
.inspection-list li strong {
|
| 134 |
-
color:
|
| 135 |
}
|
| 136 |
|
| 137 |
-
/* Button spacing */
|
| 138 |
.action-buttons {
|
| 139 |
-
margin-top:
|
| 140 |
-
padding-top:
|
| 141 |
-
border-top:
|
| 142 |
text-align: center;
|
| 143 |
}
|
| 144 |
|
| 145 |
.btn {
|
| 146 |
-
margin:
|
| 147 |
-
padding: 12px
|
| 148 |
font-weight: 600;
|
| 149 |
}
|
| 150 |
|
| 151 |
-
/* Report ID spacing */
|
| 152 |
.report-meta {
|
| 153 |
display: flex;
|
| 154 |
justify-content: space-between;
|
| 155 |
align-items: center;
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
|
| 162 |
-
/* Alert/Info box spacing */
|
| 163 |
.info-box {
|
| 164 |
-
padding:
|
| 165 |
-
margin:
|
| 166 |
border-radius: 8px;
|
| 167 |
-
border-left:
|
| 168 |
background: #e7f7f9;
|
| 169 |
}
|
| 170 |
|
| 171 |
-
/* Loading Overlay */
|
| 172 |
#loading {
|
| 173 |
display: none;
|
| 174 |
text-align: center;
|
| 175 |
-
margin-top:
|
| 176 |
}
|
| 177 |
|
| 178 |
/* Print optimization */
|
|
@@ -287,12 +285,13 @@
|
|
| 287 |
<div class="header">
|
| 288 |
<h1>Car Damage Assessment Report</h1>
|
| 289 |
<p>AI-Powered Visual Inspection & Insurance Reporting</p>
|
| 290 |
-
<p><small>Powered by AutoAssess-AI
|
| 291 |
</div>
|
| 292 |
|
| 293 |
<!-- UPLOAD FORM -->
|
| 294 |
<div id="uploadSection" class="section">
|
| 295 |
<h2 class="section-title"><i class="bi bi-cloud-upload"></i> Upload Vehicle Image</h2>
|
|
|
|
| 296 |
<form id="uploadForm">
|
| 297 |
<div class="row mb-3">
|
| 298 |
<div class="col-md-4">
|
|
@@ -333,6 +332,9 @@
|
|
| 333 |
<div>
|
| 334 |
<strong>Generated:</strong> <span id="reportDate">...</span>
|
| 335 |
</div>
|
|
|
|
|
|
|
|
|
|
| 336 |
</div>
|
| 337 |
|
| 338 |
<!-- VEHICLE INFO -->
|
|
@@ -475,7 +477,7 @@
|
|
| 475 |
<!-- DISCLAIMER -->
|
| 476 |
<div class="info-box">
|
| 477 |
<strong><i class="bi bi-exclamation-triangle"></i> Important Disclaimer:</strong><br>
|
| 478 |
-
This report is
|
| 479 |
</div>
|
| 480 |
|
| 481 |
<!-- ACTION BUTTONS -->
|
|
@@ -492,7 +494,7 @@
|
|
| 492 |
<div class="text-center mt-5 text-muted">
|
| 493 |
<small>
|
| 494 |
Generated by AutoAssess-AI | YOLO11s Detection System<br>
|
| 495 |
-
Report ID: <span id="footerReportId">...</span> |
|
| 496 |
</small>
|
| 497 |
</div>
|
| 498 |
|
|
@@ -644,4 +646,10 @@
|
|
| 644 |
});
|
| 645 |
</script>
|
| 646 |
</body>
|
| 647 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
|
|
| 7 |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 8 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
| 9 |
<style>
|
| 10 |
+
:root {
|
| 11 |
+
--accent: #1f7aec;
|
| 12 |
+
--muted: #6c757d;
|
| 13 |
+
--card-shadow: 0 1px 4px rgba(0,0,0,0.08);
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
body {
|
| 17 |
+
background-color: #f5f7fb;
|
| 18 |
+
line-height: 1.7;
|
| 19 |
}
|
| 20 |
|
| 21 |
.container {
|
| 22 |
+
max-width: 1100px;
|
| 23 |
+
padding: 32px 18px;
|
| 24 |
}
|
| 25 |
|
|
|
|
| 26 |
.section {
|
| 27 |
background: white;
|
| 28 |
border-radius: 12px;
|
| 29 |
+
padding: 24px;
|
| 30 |
+
margin-bottom: 24px;
|
| 31 |
+
box-shadow: var(--card-shadow);
|
| 32 |
}
|
| 33 |
|
| 34 |
.section-title {
|
| 35 |
+
font-size: 1.3rem;
|
| 36 |
font-weight: 700;
|
| 37 |
+
margin-bottom: 14px;
|
| 38 |
+
padding-bottom: 8px;
|
| 39 |
+
border-bottom: 2px solid var(--accent);
|
| 40 |
display: flex;
|
| 41 |
align-items: center;
|
| 42 |
gap: 10px;
|
| 43 |
}
|
| 44 |
|
|
|
|
| 45 |
.header {
|
| 46 |
text-align: center;
|
| 47 |
+
padding: 28px 20px;
|
| 48 |
background: white;
|
| 49 |
+
color: #1f2430;
|
| 50 |
border-radius: 12px;
|
| 51 |
+
margin-bottom: 28px;
|
| 52 |
+
box-shadow: var(--card-shadow);
|
| 53 |
}
|
| 54 |
|
| 55 |
.header h1 {
|
| 56 |
+
margin-bottom: 8px;
|
| 57 |
+
font-size: 1.9rem;
|
| 58 |
}
|
| 59 |
|
| 60 |
.header p {
|
| 61 |
+
margin-bottom: 6px;
|
| 62 |
+
color: var(--muted);
|
| 63 |
}
|
| 64 |
|
|
|
|
| 65 |
.metric-card {
|
| 66 |
background: white;
|
| 67 |
border-radius: 12px;
|
| 68 |
+
padding: 18px;
|
| 69 |
text-align: center;
|
| 70 |
+
box-shadow: var(--card-shadow);
|
| 71 |
+
margin-bottom: 16px;
|
| 72 |
+
transition: transform 0.15s;
|
| 73 |
}
|
| 74 |
|
| 75 |
.metric-card:hover {
|
| 76 |
+
transform: translateY(-3px);
|
| 77 |
}
|
| 78 |
|
| 79 |
.metric-card h2 {
|
| 80 |
+
font-size: 2rem;
|
| 81 |
font-weight: 700;
|
| 82 |
+
margin: 10px 0;
|
| 83 |
}
|
| 84 |
|
| 85 |
.metric-card p {
|
| 86 |
margin: 0;
|
| 87 |
+
color: var(--muted);
|
| 88 |
font-size: 0.95rem;
|
| 89 |
}
|
| 90 |
|
|
|
|
| 91 |
.image-container {
|
| 92 |
+
margin: 12px 0;
|
| 93 |
text-align: center;
|
| 94 |
}
|
| 95 |
|
| 96 |
.image-container img {
|
| 97 |
max-width: 100%;
|
| 98 |
+
max-height: 360px;
|
| 99 |
border-radius: 8px;
|
| 100 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
|
| 101 |
object-fit: contain;
|
| 102 |
}
|
| 103 |
|
|
|
|
| 104 |
.table {
|
| 105 |
+
margin-top: 14px;
|
| 106 |
margin-bottom: 0;
|
| 107 |
}
|
| 108 |
|
| 109 |
.table th {
|
| 110 |
+
background-color: #f2f5fa;
|
| 111 |
font-weight: 600;
|
| 112 |
+
padding: 12px;
|
| 113 |
}
|
| 114 |
|
| 115 |
.table td {
|
| 116 |
+
padding: 12px;
|
| 117 |
vertical-align: middle;
|
| 118 |
}
|
| 119 |
|
|
|
|
| 120 |
.inspection-list {
|
| 121 |
list-style: none;
|
| 122 |
padding: 0;
|
| 123 |
}
|
| 124 |
|
| 125 |
.inspection-list li {
|
| 126 |
+
padding: 12px 14px;
|
| 127 |
+
margin-bottom: 10px;
|
| 128 |
+
background: #f7f9fc;
|
| 129 |
+
border-left: 4px solid var(--accent);
|
| 130 |
border-radius: 6px;
|
| 131 |
}
|
| 132 |
|
| 133 |
.inspection-list li strong {
|
| 134 |
+
color: var(--accent);
|
| 135 |
}
|
| 136 |
|
|
|
|
| 137 |
.action-buttons {
|
| 138 |
+
margin-top: 30px;
|
| 139 |
+
padding-top: 24px;
|
| 140 |
+
border-top: 1px solid #e4e7ed;
|
| 141 |
text-align: center;
|
| 142 |
}
|
| 143 |
|
| 144 |
.btn {
|
| 145 |
+
margin: 4px;
|
| 146 |
+
padding: 12px 26px;
|
| 147 |
font-weight: 600;
|
| 148 |
}
|
| 149 |
|
|
|
|
| 150 |
.report-meta {
|
| 151 |
display: flex;
|
| 152 |
justify-content: space-between;
|
| 153 |
align-items: center;
|
| 154 |
+
gap: 12px;
|
| 155 |
+
padding: 14px 16px;
|
| 156 |
+
background: #eef4ff;
|
| 157 |
+
border: 1px solid #dbe7ff;
|
| 158 |
+
border-radius: 10px;
|
| 159 |
+
margin-bottom: 20px;
|
| 160 |
}
|
| 161 |
|
|
|
|
| 162 |
.info-box {
|
| 163 |
+
padding: 16px;
|
| 164 |
+
margin: 18px 0;
|
| 165 |
border-radius: 8px;
|
| 166 |
+
border-left: 4px solid #17a2b8;
|
| 167 |
background: #e7f7f9;
|
| 168 |
}
|
| 169 |
|
|
|
|
| 170 |
#loading {
|
| 171 |
display: none;
|
| 172 |
text-align: center;
|
| 173 |
+
margin-top: 40px;
|
| 174 |
}
|
| 175 |
|
| 176 |
/* Print optimization */
|
|
|
|
| 285 |
<div class="header">
|
| 286 |
<h1>Car Damage Assessment Report</h1>
|
| 287 |
<p>AI-Powered Visual Inspection & Insurance Reporting</p>
|
| 288 |
+
<p><small>Powered by AutoAssess-AI - YOLO11s (1024) - Inference tuned for clarity</small></p>
|
| 289 |
</div>
|
| 290 |
|
| 291 |
<!-- UPLOAD FORM -->
|
| 292 |
<div id="uploadSection" class="section">
|
| 293 |
<h2 class="section-title"><i class="bi bi-cloud-upload"></i> Upload Vehicle Image</h2>
|
| 294 |
+
<p class="text-muted mb-3" style="font-size: 0.95rem;">Add a clear exterior photo (JPEG/PNG). We keep uploads local for this session.</p>
|
| 295 |
<form id="uploadForm">
|
| 296 |
<div class="row mb-3">
|
| 297 |
<div class="col-md-4">
|
|
|
|
| 332 |
<div>
|
| 333 |
<strong>Generated:</strong> <span id="reportDate">...</span>
|
| 334 |
</div>
|
| 335 |
+
<div class="text-muted" style="font-size: 0.9rem;">
|
| 336 |
+
Model: YOLO11s (1024) - Inference on-device
|
| 337 |
+
</div>
|
| 338 |
</div>
|
| 339 |
|
| 340 |
<!-- VEHICLE INFO -->
|
|
|
|
| 477 |
<!-- DISCLAIMER -->
|
| 478 |
<div class="info-box">
|
| 479 |
<strong><i class="bi bi-exclamation-triangle"></i> Important Disclaimer:</strong><br>
|
| 480 |
+
This AI report is a preliminary indicator only. Confirm findings with a certified technician or adjuster before decisions.
|
| 481 |
</div>
|
| 482 |
|
| 483 |
<!-- ACTION BUTTONS -->
|
|
|
|
| 494 |
<div class="text-center mt-5 text-muted">
|
| 495 |
<small>
|
| 496 |
Generated by AutoAssess-AI | YOLO11s Detection System<br>
|
| 497 |
+
Report ID: <span id="footerReportId">...</span> | (c) 2025 AutoAssess-AI
|
| 498 |
</small>
|
| 499 |
</div>
|
| 500 |
|
|
|
|
| 646 |
});
|
| 647 |
</script>
|
| 648 |
</body>
|
| 649 |
+
</html>
|
| 650 |
+
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
|
app/utils.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
from ultralytics import YOLO
|
| 2 |
from groq import Groq
|
| 3 |
-
from .config import MODEL_PATH, GROQ_API_KEY
|
| 4 |
import cv2
|
| 5 |
import json
|
| 6 |
import logging
|
|
@@ -27,7 +27,7 @@ def run_inference(image_path, output_path):
|
|
| 27 |
start_time = time.time()
|
| 28 |
|
| 29 |
# Run inference
|
| 30 |
-
results = model(image_path, imgsz=
|
| 31 |
|
| 32 |
end_time = time.time()
|
| 33 |
processing_time_ms = (end_time - start_time) * 1000
|
|
@@ -83,7 +83,7 @@ def run_inference(image_path, output_path):
|
|
| 83 |
"detections": detections,
|
| 84 |
"processing_time": round(processing_time_ms, 2),
|
| 85 |
"count": len(detections),
|
| 86 |
-
"model_info": "YOLO11s"
|
| 87 |
}
|
| 88 |
|
| 89 |
def generate_insurance_report(detection_data, make, model_name, year):
|
|
@@ -168,4 +168,4 @@ def generate_insurance_report(detection_data, make, model_name, year):
|
|
| 168 |
"recommended_action": "Manual Inspection",
|
| 169 |
"immediate_actions": ["Contact support"],
|
| 170 |
"secondary_actions": []
|
| 171 |
-
}
|
|
|
|
| 1 |
from ultralytics import YOLO
|
| 2 |
from groq import Groq
|
| 3 |
+
from .config import MODEL_PATH, MODEL_IMAGE_SIZE, GROQ_API_KEY
|
| 4 |
import cv2
|
| 5 |
import json
|
| 6 |
import logging
|
|
|
|
| 27 |
start_time = time.time()
|
| 28 |
|
| 29 |
# Run inference
|
| 30 |
+
results = model(image_path, imgsz=MODEL_IMAGE_SIZE, conf=0.4)
|
| 31 |
|
| 32 |
end_time = time.time()
|
| 33 |
processing_time_ms = (end_time - start_time) * 1000
|
|
|
|
| 83 |
"detections": detections,
|
| 84 |
"processing_time": round(processing_time_ms, 2),
|
| 85 |
"count": len(detections),
|
| 86 |
+
"model_info": f"YOLO11s ({MODEL_IMAGE_SIZE})"
|
| 87 |
}
|
| 88 |
|
| 89 |
def generate_insurance_report(detection_data, make, model_name, year):
|
|
|
|
| 168 |
"recommended_action": "Manual Inspection",
|
| 169 |
"immediate_actions": ["Contact support"],
|
| 170 |
"secondary_actions": []
|
| 171 |
+
}
|
models/cardd_model_info.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
{
|
| 2 |
"model_name": "CarDD Car Damage Detector",
|
| 3 |
"version": "1.0.0",
|
| 4 |
-
"experiment_id": "
|
| 5 |
"architecture": {
|
| 6 |
"base": "YOLO11s",
|
| 7 |
"parameters": "9.4M",
|
| 8 |
-
"input_resolution":
|
| 9 |
"format": "PyTorch (.pt)"
|
| 10 |
},
|
| 11 |
"metrics_test_set": {
|
| 12 |
-
"mAP50-95": 0.
|
| 13 |
-
"mAP50": 0.
|
| 14 |
-
"precision": 0.
|
| 15 |
-
"recall": 0.
|
| 16 |
-
"inference_latency_ms":
|
| 17 |
},
|
| 18 |
"classes": [
|
| 19 |
"dent",
|
|
@@ -23,7 +23,7 @@
|
|
| 23 |
"lamp_broken",
|
| 24 |
"tire_flat"
|
| 25 |
],
|
| 26 |
-
"deployment_notes": "
|
| 27 |
-
"created_at": "2025-12-
|
| 28 |
"author": ""
|
| 29 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"model_name": "CarDD Car Damage Detector",
|
| 3 |
"version": "1.0.0",
|
| 4 |
+
"experiment_id": "Exp4_yolo11s_1024",
|
| 5 |
"architecture": {
|
| 6 |
"base": "YOLO11s",
|
| 7 |
"parameters": "9.4M",
|
| 8 |
+
"input_resolution": 1024,
|
| 9 |
"format": "PyTorch (.pt)"
|
| 10 |
},
|
| 11 |
"metrics_test_set": {
|
| 12 |
+
"mAP50-95": 0.5855,
|
| 13 |
+
"mAP50": 0.7518,
|
| 14 |
+
"precision": 0.7806,
|
| 15 |
+
"recall": 0.7012,
|
| 16 |
+
"inference_latency_ms": 10.07
|
| 17 |
},
|
| 18 |
"classes": [
|
| 19 |
"dent",
|
|
|
|
| 23 |
"lamp_broken",
|
| 24 |
"tire_flat"
|
| 25 |
],
|
| 26 |
+
"deployment_notes": "Final selected model. Higher mAP50 than the 640px variant while maintaining real-time inference speed (~10 ms per image).",
|
| 27 |
+
"created_at": "2025-12-10 00:36:50",
|
| 28 |
"author": ""
|
| 29 |
}
|
models/cardd_yolo11s_1024_final.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e4f0e35c89c02693fff712a16873bfe550300e208e7a31c932e335a1cf548bd
|
| 3 |
+
size 19206483
|