Spaces:
Runtime error
Runtime error
File size: 1,690 Bytes
0e0cc3e e3b60de 2b21a73 e3b60de b505c60 190dbf0 e3b60de b505c60 e3b60de b505c60 0e0cc3e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | export const MODEL_URL = '/models/countmodel.onnx'
export const MODEL_640_URL = '/models/countmodel-640.onnx'
export const MODEL_INT8_URL = '/models/countmodel-int8.onnx'
export const INFERENCE_SIZE = 1024
export const INFERENCE_SIZE_SMALL = 640
/** Recall-friendly decode; post-process handles precision on sparse scenes. */
export const CONFIDENCE_THRESHOLD = 0.52
export const IOU_THRESHOLD = 0.45
export const IOU_THRESHOLD_DENSE = 0.52
/** Raw candidates before NMS — above this use denser NMS IoU. */
export const IOU_RECALL_RAW_COUNT = 1500
export const TILE_OVERLAP = 0.28
export const MAX_DETECTIONS = 6000
/** Median-area multipliers for uniform bundles only. */
export const BOX_SIZE_LOWER_MULT = 0.43
export const BOX_SIZE_UPPER_MULT = 2.8
/** Loose area bounds for dense / mixed-size bundles. */
export const BOX_SIZE_LOOSE_LOWER = 0.45
export const BOX_SIZE_LOOSE_UPPER = 12
/** Skip strict size filter when p90/p10 area ratio exceeds this. */
export const MIXED_SIZE_RATIO = 3
/** Skip strict size filter when this many boxes survive NMS. */
export const DENSE_DETECTION_COUNT = 500
/** Merge tile duplicates only — fraction of smaller box min side. */
export const CENTER_MERGE_SIZE_RATIO = 0.28
/** Merge boxes whose centroid distance < this x median nearest-neighbor distance. */
export const CENTROID_MERGE_NN_FACTOR = 0.5
/** IOS (intersection-over-smaller) match-metric threshold for tiling dedup. */
export const IOS_NMS_THRESHOLD = 0.5
/** Drop box if max(w,h)/min(w,h) > this (end-on pipe ends are ~square). */
export const END_ASPECT_RATIO_MAX = 2.5
export const GROUP_COLORS = [
'#ef4444',
'#3b82f6',
'#22c55e',
'#eab308',
'#a855f7',
'#f97316',
]
|