Oblix commited on
Commit
2da0af7
1 Parent(s): ae23e03

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -40,7 +40,7 @@ const permuted = output.output0[0].transpose(1, 0);
40
  // - the remaining 11 are the probabilities for each class
41
 
42
  // Example code to format it nicely:
43
- const result = [];
44
  const threshold = 0.5; // Adjust the threshold as needed
45
  const [scaledHeight, scaledWidth] = pixel_values.dims.slice(-2);
46
  for (const [xc, yc, w, h, ...scores] of permuted.tolist()) {
@@ -57,7 +57,7 @@ for (const [xc, yc, w, h, ...scores] of permuted.tolist()) {
57
  if (score < threshold) continue; // Not confident enough
58
 
59
  const label = model.config.id2label[argmax];
60
- result.push({
61
  x1, x2, y1, y2, score, label, index: argmax,
62
  });
63
  }
 
40
  // - the remaining 11 are the probabilities for each class
41
 
42
  // Example code to format it nicely:
43
+ const results = [];
44
  const threshold = 0.5; // Adjust the threshold as needed
45
  const [scaledHeight, scaledWidth] = pixel_values.dims.slice(-2);
46
  for (const [xc, yc, w, h, ...scores] of permuted.tolist()) {
 
57
  if (score < threshold) continue; // Not confident enough
58
 
59
  const label = model.config.id2label[argmax];
60
+ results.push({
61
  x1, x2, y1, y2, score, label, index: argmax,
62
  });
63
  }