Skip to content

Commit fcaf0d7

Browse files
committed
rm extends video since we feed in out inputs - note this could be interesting for future video support
1 parent 3e68c73 commit fcaf0d7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/UNET/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ Image Classifier using pre-trained networks
1010
import * as tf from '@tensorflow/tfjs';
1111
import callCallback from '../utils/callcallback';
1212
import { array3DToImage } from '../utils/imageUtilities';
13-
import Video from '../utils/Video';
1413
import p5Utils from '../utils/p5Utils';
1514

1615
const URL = 'https://raw.githubusercontent.com/zaidalyafeai/HostedModels/master/unet-128/model.json';
1716
const imageSize = 128;
1817

19-
class UNET extends Video {
18+
class UNET {
2019
/**
2120
* Create UNET class.
2221
* @param {HTMLVideoElement | HTMLImageElement} video - The video or image to be used for segmentation.
@@ -25,16 +24,12 @@ class UNET extends Video {
2524
* that will be resolved once the model has loaded.
2625
*/
2726
constructor(video, options, callback) {
28-
super(video, imageSize);
2927
this.modelReady = false;
3028
this.isPredicting = false;
3129
this.ready = callCallback(this.loadModel(), callback);
3230
}
3331

3432
async loadModel() {
35-
if (this.videoElt && !this.video) {
36-
this.video = await this.loadVideo();
37-
}
3833
this.model = await tf.loadLayersModel(URL);
3934
this.modelReady = true;
4035
return this;

0 commit comments

Comments
 (0)