Skip to content

Commit 1d4faf8

Browse files
committed
wops
1 parent 1b767a4 commit 1d4faf8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/YOLO/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ class YOLOBase {
7777
*/
7878
async detect(img) {
7979
const predictions = tf.tidy(() => {
80-
const data = this.preProccess(img);
80+
const data = this.preProcess(img);
8181
const preds = this.model.predict(data);
8282
return preds;
8383
});
84-
const results = await this.postProccess(predictions);
84+
const results = await this.postProcess(predictions);
8585
return results;
8686
}
8787

@@ -108,7 +108,7 @@ class YOLOBase {
108108
dummy.dispose();
109109
}
110110

111-
preProccess(img) {
111+
preProcess(img) {
112112
let image;
113113
if (!(img instanceof tf.Tensor)) {
114114
if (img instanceof HTMLImageElement || img instanceof HTMLVideoElement) {
@@ -139,11 +139,11 @@ class YOLOBase {
139139

140140

141141
/**
142-
* postproccessing for the yolo output
142+
* postProcessing for the yolo output
143143
* TODO : make this more modular in preperation for yolov3-tiny
144144
* @param rawPrediction a 4D tensor 13*13*425
145145
*/
146-
async postProccess(rawPrediction) {
146+
async postProcess(rawPrediction) {
147147
const [boxes, boxScores, classes, Indices] = tf.tidy(() => {
148148
const reshaped = tf.reshape(rawPrediction, [13, 13, this.anchorsLength, this.classesLength + 5]);
149149
// Box Coords

src/YOLO/index_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This software is released under the MIT License.
44
// https://opensource.org/licenses/MIT
55

6-
const { tf, YOLO } = ml5;
6+
const { YOLO } = ml5;
77

88
const YOLO_DEFAULTS = {
99
filterBoxesThreshold: 0.01,

0 commit comments

Comments
 (0)