Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
@@ -67,10 +67,10 @@ function renderBox([xmin, ymin, xmax, ymax, score, id]) {
|
|
67 |
boxElement.className = 'bounding-box';
|
68 |
Object.assign(boxElement.style, {
|
69 |
borderColor: color,
|
70 |
-
left: 100 * xmin + '%',
|
71 |
-
top: 100 * ymin + '%',
|
72 |
-
width: 100 * (xmax - xmin) + '%',
|
73 |
-
height: 100 * (ymax - ymin) + '%',
|
74 |
})
|
75 |
|
76 |
// Draw label
|
|
|
67 |
boxElement.className = 'bounding-box';
|
68 |
Object.assign(boxElement.style, {
|
69 |
borderColor: color,
|
70 |
+
left: 100 * xmin / 640 + '%',
|
71 |
+
top: 100 * ymin / 640 + '%',
|
72 |
+
width: 100 * (xmax - xmin) / 640 + '%',
|
73 |
+
height: 100 * (ymax - ymin) / 640 + '%',
|
74 |
})
|
75 |
|
76 |
// Draw label
|