idmission-web-sdk 2.1.105 → 2.1.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,6 +44,7 @@ export declare function useLoadDocumentDetector({ modelPath, modelLoadTimeoutMs,
44
44
  setModelError: import("react").Dispatch<import("react").SetStateAction<Error | null>>;
45
45
  };
46
46
  export type DocumentDetectionPrediction = {
47
+ prediction: ObjectDetectorPrediction;
47
48
  detectedObjects: DetectedObject[];
48
49
  detectionTime: number;
49
50
  detectionScore: number;
@@ -1 +1 @@
1
- export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/DocumentDetector/DocumentDetector-20241010_134238.tflite";
1
+ export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240825/model_fp16.tflite";
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
234
234
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
235
235
  };
236
236
 
237
- var webSdkVersion = '2.1.105';
237
+ var webSdkVersion = '2.1.107';
238
238
 
239
239
  function getPlatform() {
240
240
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2778,7 +2778,7 @@ function average(arr) {
2778
2778
 
2779
2779
  var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
2780
2780
 
2781
- var defaultDocumentDetectorModelPath = "".concat(DEFAULT_CDN_URL, "/models/DocumentDetector/DocumentDetector-20241010_134238.tflite");
2781
+ var defaultDocumentDetectorModelPath = "".concat(DEFAULT_CDN_URL, "/models/docdetectmp20240825/model_fp16.tflite");
2782
2782
 
2783
2783
  var defaultFocusModelPath = "".concat(DEFAULT_CDN_URL, "/models/Focus/Focus-20241008_102708.tflite");
2784
2784
 
@@ -5569,7 +5569,7 @@ var defaultDocumentDetectionThresholds = {
5569
5569
  idCardFront: 0.6,
5570
5570
  idCardBack: 0.6,
5571
5571
  passport: 0.4,
5572
- stability: 0.9
5572
+ stability: 0.85
5573
5573
  };
5574
5574
  var documentTypeDisplayNames = {
5575
5575
  idCardFront: 'ID card front',
@@ -5609,7 +5609,8 @@ function loadDocumentDetector() {
5609
5609
  delegate: modelCapabilities.delegate
5610
5610
  },
5611
5611
  scoreThreshold: scoreThreshold,
5612
- runningMode: 'VIDEO'
5612
+ runningMode: 'VIDEO',
5613
+ maxResults: 3
5613
5614
  }])];
5614
5615
  case 3:
5615
5616
  _a[_b] = _e.sent();
@@ -5764,14 +5765,14 @@ function processDocumentDetectorPrediction(prediction, thresholds, boundaries) {
5764
5765
  var boundaryRight = (_c = boundaries.right) !== null && _c !== void 0 ? _c : 20;
5765
5766
  var boundaryBottom = (_d = boundaries.bottom) !== null && _d !== void 0 ? _d : 20;
5766
5767
  var frameWidth80Pct = frameWidth * 0.8;
5767
- var detectedObjects = applyNonMaxSuppression(detections.map(function (d) {
5768
- var _a;
5769
- var category = (_a = d.categories) === null || _a === void 0 ? void 0 : _a[0];
5770
- return {
5771
- label: category === null || category === void 0 ? void 0 : category.categoryName,
5772
- score: category === null || category === void 0 ? void 0 : category.score,
5773
- box: convertBoundingBox(d.boundingBox)
5774
- };
5768
+ var detectedObjects = applyNonMaxSuppression(detections.flatMap(function (d) {
5769
+ return d.categories.map(function (category) {
5770
+ return {
5771
+ label: category === null || category === void 0 ? void 0 : category.categoryName,
5772
+ score: category === null || category === void 0 ? void 0 : category.score,
5773
+ box: convertBoundingBox(d.boundingBox)
5774
+ };
5775
+ });
5775
5776
  }), function (obj) {
5776
5777
  var _a = obj.box,
5777
5778
  xMin = _a.xMin,
@@ -5841,6 +5842,7 @@ function processDocumentDetectorPrediction(prediction, thresholds, boundaries) {
5841
5842
  }
5842
5843
  }
5843
5844
  return {
5845
+ prediction: prediction,
5844
5846
  detectedObjects: detectedObjects,
5845
5847
  detectionScore: detectionScore,
5846
5848
  detectionTime: time,