SsdMobilenetv1Options.js 1.2 KB

123456789101112131415161718192021222324252627
  1. var SsdMobilenetv1Options = /** @class */ (function () {
  2. function SsdMobilenetv1Options(_a) {
  3. var _b = _a === void 0 ? {} : _a, minConfidence = _b.minConfidence, maxResults = _b.maxResults;
  4. this._name = 'SsdMobilenetv1Options';
  5. this._minConfidence = minConfidence || 0.5;
  6. this._maxResults = maxResults || 100;
  7. if (typeof this._minConfidence !== 'number' || this._minConfidence <= 0 || this._minConfidence >= 1) {
  8. throw new Error(this._name + " - expected minConfidence to be a number between 0 and 1");
  9. }
  10. if (typeof this._maxResults !== 'number') {
  11. throw new Error(this._name + " - expected maxResults to be a number");
  12. }
  13. }
  14. Object.defineProperty(SsdMobilenetv1Options.prototype, "minConfidence", {
  15. get: function () { return this._minConfidence; },
  16. enumerable: true,
  17. configurable: true
  18. });
  19. Object.defineProperty(SsdMobilenetv1Options.prototype, "maxResults", {
  20. get: function () { return this._maxResults; },
  21. enumerable: true,
  22. configurable: true
  23. });
  24. return SsdMobilenetv1Options;
  25. }());
  26. export { SsdMobilenetv1Options };
  27. //# sourceMappingURL=SsdMobilenetv1Options.js.map