Skip to content

Commit

Permalink
Updated bounding box color and removed 0.3 limit on threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbozarth committed Jul 10, 2018
1 parent f8dbdf6 commit e26e388
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h1>MAX Object Detector</h1>
<b>Probability Threshold:</b>
<span>50</span>%
</div>
<input id="threshold-range" type="range" min="1" max="100" value="50" class="slider">
<input id="threshold-range" type="range" min="0" max="100" value="50" class="slider">
</div>

</div>
Expand Down
8 changes: 4 additions & 4 deletions static/js/webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function paint_canvas() {
ctx.font = '16px "IBM Plex Sans"';
ctx.textBaseline = 'top';
ctx.lineWidth = '3';
ctx.strokeStyle = '#000000';
ctx.strokeStyle = '#00FF00';

for (var i = 0; i < predictions.length; i++) {
if (predictions[i]['probability'] > threshold) {
Expand Down Expand Up @@ -86,10 +86,10 @@ function paint_label_text(i, ctx, can) {
}
var tHeight = parseInt(ctx.font, 10) * 1.4;

ctx.fillStyle = '#000000';
ctx.fillStyle = '#00FF00';
ctx.fillRect(x, y, tWidth + 3, tHeight);

ctx.fillStyle = '#FFFFFF';
ctx.fillStyle = '#000000';
ctx.fillText(text, x + 1, y);
}

Expand All @@ -104,7 +104,7 @@ $(function() {
var file = form[0].files[0];
var data = new FormData();
data.append('image', file);
data.append('threshold', 0.3);
data.append('threshold', 0);

// Display image on UI
var reader = new FileReader();
Expand Down

0 comments on commit e26e388

Please sign in to comment.