Get the required image sizes (height and width).
()
| 170 | |
| 171 | /** Get the required image sizes (height and width). */ |
| 172 | getImageSize() { |
| 173 | if (this.model == null) { |
| 174 | throw new Error( |
| 175 | `Model is not loaded yet. Call ensureModelLoaded() first.`); |
| 176 | } |
| 177 | return { |
| 178 | height: this.model.inputs[0].shape[1], |
| 179 | width: this.model.inputs[0].shape[2] |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | getFileSystemCacheDirectory_() { |
| 184 | const path = require('path'); |