diff --git a/algorithm/sv_algorithm_base.cpp b/algorithm/sv_algorithm_base.cpp index 19cbbdd..725519e 100644 --- a/algorithm/sv_algorithm_base.cpp +++ b/algorithm/sv_algorithm_base.cpp @@ -800,6 +800,8 @@ void SingleObjectTrackerBase::init(cv::Mat img_, const cv::Rect& bounding_box_) } void SingleObjectTrackerBase::track(cv::Mat img_, TargetsInFrame& tgts_) { + + Rect rect; bool ok = trackImpl(img_, rect); @@ -809,6 +811,10 @@ void SingleObjectTrackerBase::track(cv::Mat img_, TargetsInFrame& tgts_) tgts_.setFPS(1000.0 / std::chrono::duration_cast(t1 - this->_t0).count()); this->_t0 = std::chrono::system_clock::now(); tgts_.setTimeNow(); + double z = 0; + double x = 0; + double y = 0; + if (ok) { @@ -818,6 +824,10 @@ void SingleObjectTrackerBase::track(cv::Mat img_, TargetsInFrame& tgts_) tgt.setLOS(tgt.cx, tgt.cy, this->camera_matrix, img_.cols, img_.rows); int ow = int(round(rect.width)); int oh = int(round(rect.height)); + + + + if (this->_use_width_or_height == 0) { double z = this->camera_matrix.at(0, 0) * this->_object_ws / ow; @@ -1199,14 +1209,5 @@ void CommonObjectDetectorBase::_load() - - - - - - - - - } diff --git a/confs/calib_219_1080.yaml b/confs/calib_219_1080.yaml new file mode 100755 index 0000000..fd86967 --- /dev/null +++ b/confs/calib_219_1080.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "Mon 19 Feb 2024 12:26:41 CST" +image_width: 1920 +image_height: 1080 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 1.1499019538499235e+03, 0., 8.9571442596734767e+02, 0., + 1.1521262836695837e+03, 4.1676362109157282e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ -3.2652765002575385e-01, 1.1930967472505005e-01, + 1.1874516620581086e-03, -4.4657438605475813e-04, + -2.0542911771362624e-02 ] +avg_reprojection_error: 1.2404343913457176e+00 diff --git a/confs/calib_219_480.yaml b/confs/calib_219_480.yaml new file mode 100755 index 0000000..478eb2c --- /dev/null +++ b/confs/calib_219_480.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "Mon 19 Feb 2024 09:47:20 CST" +image_width: 640 +image_height: 480 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 3.9479472615087843e+02, 0., 3.1680548645658507e+02, 0., + 5.3258234195695456e+02, 2.2560303647955251e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ -3.0654200332908565e-01, 8.5703751899094405e-02, + 7.9399589635363447e-04, -2.2386130390877925e-04, + 8.3664876215281108e-03 ] +avg_reprojection_error: 3.5349928023572558e-01 diff --git a/confs/calib_219_720.yaml b/confs/calib_219_720.yaml new file mode 100755 index 0000000..3e950cc --- /dev/null +++ b/confs/calib_219_720.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "Mon 19 Feb 2024 10:54:42 CST" +image_width: 1280 +image_height: 720 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 8.1366718040158514e+02, 0., 6.3675814156135323e+02, 0., + 8.1971372883272659e+02, 3.4681895215003095e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ -3.4242823662593191e-01, 1.5751500244397093e-01, + -1.3264288102205965e-03, 1.2231724419136888e-03, + -4.2459124145250125e-02 ] +avg_reprojection_error: 5.9403475506306169e-01 diff --git a/confs/calib_305_1080.yaml b/confs/calib_305_1080.yaml new file mode 100755 index 0000000..c88d336 --- /dev/null +++ b/confs/calib_305_1080.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "Tue 05 Mar 2024 00:16:05 CST" +image_width: 1920 +image_height: 1080 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 1.0792305238523386e+03, 0., 9.6402699186014104e+02, 0., + 1.0789154594652043e+03, 5.2143171148859722e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ -3.2399749923006838e-01, 1.4009707192270629e-01, + -5.0929293744069739e-04, 7.7449516370686658e-04, + -3.3041284237351247e-02 ] +avg_reprojection_error: 4.8428655304348994e-01 diff --git a/confs/calib_305_480.yaml b/confs/calib_305_480.yaml new file mode 100755 index 0000000..4e2e378 --- /dev/null +++ b/confs/calib_305_480.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "Tue 05 Mar 2024 00:09:28 CST" +image_width: 640 +image_height: 480 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 3.5104728433883020e+02, 0., 3.2056231183068672e+02, 0., + 4.6752631853837141e+02, 2.3765446898850004e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ -3.2042681898621755e-01, 1.3161967829089724e-01, + -2.5004100102887805e-04, 3.2425073118156353e-04, + -2.8315520843532581e-02 ] +avg_reprojection_error: 2.9118844690529377e-01 diff --git a/confs/calib_305_720.yaml b/confs/calib_305_720.yaml new file mode 100644 index 0000000..4092eaa --- /dev/null +++ b/confs/calib_305_720.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "2024年04月09日 星期二 17时16分01秒" +image_width: 1280 +image_height: 720 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 6.5981810777030012e+02, 0., 6.3625030971425269e+02, 0., + 6.5921929597654923e+02, 3.5825666624930159e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ -5.1997977213625930e-02, -1.8689595668025512e-03, + 3.4576738666496700e-04, -1.8120564025011093e-03, + 1.4197596521055530e-04 ] +avg_reprojection_error: 2.2034927383015476e-01 diff --git a/confs/calib_305_720_old.yaml b/confs/calib_305_720_old.yaml new file mode 100755 index 0000000..ecc80a6 --- /dev/null +++ b/confs/calib_305_720_old.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "Tue 05 Mar 2024 00:28:04 CST" +image_width: 1280 +image_height: 720 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 6.9634892550210350e+02, 0., 6.2891897989953964e+02, 0., + 6.9549429715646966e+02, 3.5944020158257149e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ -3.3624079866383610e-01, 1.6372128751453890e-01, + -1.2684750265022919e-04, 8.4251208193061985e-04, + -4.7102080237572910e-02 ] +avg_reprojection_error: 3.9725005915610290e-01 diff --git a/confs/calib_webcam_1280x720.yaml b/confs/calib_webcam_1280x720.yaml new file mode 100755 index 0000000..39df5ce --- /dev/null +++ b/confs/calib_webcam_1280x720.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "2021年01月12日 星期二 18时08分01秒" +image_width: 1280 +image_height: 720 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 7.9379415710551370e+02, 0., 2.9783879354295328e+02, 0., + 7.9491985564466654e+02, 3.0942416136837386e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ 2.0950200339181715e-01, -1.1587468096518483e+00, + 5.5342063671841328e-03, 2.2214393775334758e-04, + 1.7127431916651392e+00 ] +avg_reprojection_error: 2.8342964851391211e-01 diff --git a/confs/calib_webcam_1920x1080.yaml b/confs/calib_webcam_1920x1080.yaml new file mode 100755 index 0000000..b1fc27d --- /dev/null +++ b/confs/calib_webcam_1920x1080.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "2021年01月12日 星期二 18时08分01秒" +image_width: 1920 +image_height: 1080 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 7.9379415710551370e+02, 0., 2.9783879354295328e+02, 0., + 7.9491985564466654e+02, 3.0942416136837386e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ 2.0950200339181715e-01, -1.1587468096518483e+00, + 5.5342063671841328e-03, 2.2214393775334758e-04, + 1.7127431916651392e+00 ] +avg_reprojection_error: 2.8342964851391211e-01 diff --git a/confs/calib_webcam_640x480.yaml b/confs/calib_webcam_640x480.yaml new file mode 100755 index 0000000..abd8ab0 --- /dev/null +++ b/confs/calib_webcam_640x480.yaml @@ -0,0 +1,20 @@ +%YAML:1.0 +--- +calibration_time: "2021年01月12日 星期二 18时08分01秒" +image_width: 640 +image_height: 480 +flags: 0 +camera_matrix: !!opencv-matrix + rows: 3 + cols: 3 + dt: d + data: [ 7.9379415710551370e+02, 0., 2.9783879354295328e+02, 0., + 7.9491985564466654e+02, 3.0942416136837386e+02, 0., 0., 1. ] +distortion_coefficients: !!opencv-matrix + rows: 1 + cols: 5 + dt: d + data: [ 2.0950200339181715e-01, -1.1587468096518483e+00, + 5.5342063671841328e-03, 2.2214393775334758e-04, + 1.7127431916651392e+00 ] +avg_reprojection_error: 2.8342964851391211e-01 diff --git a/confs/sv_algorithm_params.json b/confs/sv_algorithm_params.json new file mode 100755 index 0000000..c0eca51 --- /dev/null +++ b/confs/sv_algorithm_params.json @@ -0,0 +1,197 @@ +{ + "CommonObjectDetector": { + "dataset": "CAR", + "inputSize": 640, + "nmsThrs": 0.6, + "scoreThrs": 0.6, + "useWidthOrHeight": 1, + "withSegmentation": false, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetCAR": { + "kk_car": [0.12, 0.105] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "nano", + "backend": 0, + "target": 0, + "useWidthOrHeight": 0, + "sigleobjectW": 0.12, + "sigleobjectH": 0.105, + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.134, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.051], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_1280_wo_mask.json b/confs/sv_algorithm_params_1280_wo_mask.json new file mode 100755 index 0000000..1aa6685 --- /dev/null +++ b/confs/sv_algorithm_params_1280_wo_mask.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 1280, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": false, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "siamrpn", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_640_w_mask.json b/confs/sv_algorithm_params_640_w_mask.json new file mode 100755 index 0000000..8d07775 --- /dev/null +++ b/confs/sv_algorithm_params_640_w_mask.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 640, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": true, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "siamrpn", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_640_wo_mask.json b/confs/sv_algorithm_params_640_wo_mask.json new file mode 100755 index 0000000..f87fb59 --- /dev/null +++ b/confs/sv_algorithm_params_640_wo_mask.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 640, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": false, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "siamrpn", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_coco_1280.json b/confs/sv_algorithm_params_coco_1280.json new file mode 100755 index 0000000..1aa6685 --- /dev/null +++ b/confs/sv_algorithm_params_coco_1280.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 1280, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": false, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "siamrpn", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_coco_640.json b/confs/sv_algorithm_params_coco_640.json new file mode 100755 index 0000000..8d07775 --- /dev/null +++ b/confs/sv_algorithm_params_coco_640.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 640, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": true, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "siamrpn", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_csrt.json b/confs/sv_algorithm_params_csrt.json new file mode 100755 index 0000000..e45bda2 --- /dev/null +++ b/confs/sv_algorithm_params_csrt.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 640, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": true, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "csrt", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_kcf.json b/confs/sv_algorithm_params_kcf.json new file mode 100755 index 0000000..b9baa2d --- /dev/null +++ b/confs/sv_algorithm_params_kcf.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 640, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": true, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "kcf", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_nano.json b/confs/sv_algorithm_params_nano.json new file mode 100755 index 0000000..816504d --- /dev/null +++ b/confs/sv_algorithm_params_nano.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 640, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": true, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "nano", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/confs/sv_algorithm_params_siamrpn.json b/confs/sv_algorithm_params_siamrpn.json new file mode 100755 index 0000000..8d07775 --- /dev/null +++ b/confs/sv_algorithm_params_siamrpn.json @@ -0,0 +1,194 @@ +{ + "CommonObjectDetector": { + "dataset": "COCO", + "inputSize": 640, + "nmsThrs": 0.6, + "scoreThrs": 0.4, + "useWidthOrHeight": 1, + "withSegmentation": true, + "datasetPersonVehicle": { + "person": [0.5, 1.8], + "car": [4.1, 1.5], + "bus": [10, 3], + "truck": [-1, -1], + "bike": [-1, -1], + "train": [-1, -1], + "boat": [-1, -1], + "aeroplane": [-1, -1] + }, + "datasetDrone": { + "drone": [0.4, 0.2] + }, + "datasetCOCO": { + "person": [-1, -1], + "bicycle": [-1, -1], + "car": [-1, -1], + "motorcycle": [-1, -1], + "airplane": [-1, -1], + "bus": [-1, -1], + "train": [-1, -1], + "truck": [-1, -1], + "boat": [-1, -1], + "traffic light": [-1, -1], + "fire hydrant": [-1, -1], + "stop sign": [-1, -1], + "parking meter": [-1, -1], + "bench": [-1, -1], + "bird": [-1, -1], + "cat": [-1, -1], + "dog": [-1, -1], + "horse": [-1, -1], + "sheep": [-1, -1], + "cow": [-1, -1], + "elephant": [-1, -1], + "bear": [-1, -1], + "zebra": [-1, -1], + "giraffe": [-1, -1], + "backpack": [-1, -1], + "umbrella": [-1, -1], + "handbag": [-1, -1], + "tie": [-1, -1], + "suitcase": [-1, -1], + "frisbee": [-1, -1], + "skis": [-1, -1], + "snowboard": [-1, -1], + "sports ball": [-1, -1], + "kite": [-1, -1], + "baseball bat": [-1, -1], + "baseball glove": [-1, -1], + "skateboard": [-1, -1], + "surfboard": [-1, -1], + "tennis racket": [-1, -1], + "bottle": [-1, -1], + "wine glass": [-1, -1], + "cup": [-1, -1], + "fork": [-1, -1], + "knife": [-1, -1], + "spoon": [-1, -1], + "bowl": [-1, -1], + "banana": [-1, -1], + "apple": [-1, -1], + "sandwich": [-1, -1], + "orange": [-1, -1], + "broccoli": [-1, -1], + "carrot": [-1, -1], + "hot dog": [-1, -1], + "pizza": [-1, -1], + "donut": [-1, -1], + "cake": [-1, -1], + "chair": [-1, -1], + "couch": [-1, -1], + "potted plant": [-1, -1], + "bed": [-1, -1], + "dining table": [-1, -1], + "toilet": [-1, -1], + "tv": [-1, -1], + "laptop": [-1, -1], + "mouse": [-1, -1], + "remote": [-1, -1], + "keyboard": [-1, -1], + "cell phone": [-1, -1], + "microwave": [-1, -1], + "oven": [-1, -1], + "toaster": [-1, -1], + "sink": [-1, -1], + "refrigerator": [-1, -1], + "book": [-1, -1], + "clock": [-1, -1], + "vase": [-1, -1], + "scissors": [-1, -1], + "teddy bear": [-1, -1], + "hair drier": [-1, -1], + "toothbrush": [-1, -1] + } + }, + "AutoFocusObjectDetector": { + "lock_thres": 5, + "unlock_thres": 5, + "lock_scale_init": 12.0, + "lock_scale": 8.0, + "categories_filter": [], + "keep_unlocked": false, + "use_square_region": false + }, + "SingleObjectTracker": { + "algorithm": "siamrpn", + "backend": 0, + "target": 0 + }, + "MultipleObjectTracker": { + "algorithm": "sort", + "with_reid": false, + "reid_input_size": [128, 128], + "reid_num_samples": 10, + "reid_match_thres": 2.0, + "iou_thres": 0.5, + "max_age": 10, + "min_hits": 3 + }, + "LandingMarkerDetector": { + "labels": ["x", "h"], + "maxCandidates": 5 + }, + "EllipseDetector": { + "radiusInMeter": 0.5, + "preProcessingGaussKernel": 5, + "preProcessingGaussSigma": 1.306, + "thPosition": 1.0, + "maxCenterDistance": 0.05, + "minEdgeLength": 9, + "minOrientedRectSide": 2.984, + "distanceToEllipseContour": 0.111, + "minScore": 0.511, + "minReliability": 0.470, + "ns": 22, + "percentNe": 0.946, + "T_CNC": 0.121, + "T_TCN_L": 0.468, + "T_TCN_P": 0.560, + "thRadius": 0.202 + }, + "ArucoDetector": { + "dictionaryId": 10, + "markerIds": [-1], + "markerLengths": [0.2], + "adaptiveThreshConstant": 7, + "adaptiveThreshWinSizeMax": 23, + "adaptiveThreshWinSizeMin": 3, + "adaptiveThreshWinSizeStep": 10, + "aprilTagCriticalRad": 0.17453292519, + "aprilTagDeglitch": 0, + "aprilTagMaxLineFitMse": 10.0, + "aprilTagMaxNmaxima": 10, + "aprilTagMinClusterPixels": 5, + "aprilTagMinWhiteBlackDiff": 5, + "aprilTagQuadDecimate": 0.0, + "aprilTagQuadSigma": 0.0, + "cornerRefinementMaxIterations": 30, + "cornerRefinementMethod": 0, + "cornerRefinementMinAccuracy": 0.1, + "cornerRefinementWinSize": 5, + "detectInvertedMarker": false, + "errorCorrectionRate": 0.6, + "markerBorderBits": 1, + "maxErroneousBitsInBorderRate": 0.35, + "maxMarkerPerimeterRate": 4.0, + "minCornerDistanceRate": 0.05, + "minDistanceToBorder": 3, + "minMarkerDistanceRate": 0.05, + "minMarkerLengthRatioOriginalImg": 0, + "minMarkerPerimeterRate": 0.03, + "minOtsuStdDev": 5.0, + "minSideLengthCanonicalImg": 32, + "perspectiveRemoveIgnoredMarginPerCell": 0.13, + "perspectiveRemovePixelPerCell": 4, + "polygonalApproxAccuracyRate": 0.03, + "useAruco3Detection": false + }, + "ColorLineDetector": { + "line_color": "black", + "line_location": 0.5, + "line_location_a1": 0.3, + "line_location_a2": 0.7 + } +} diff --git a/include/sv_video_base.h b/include/sv_video_base.h index 674c9fb..ec5534f 100644 --- a/include/sv_video_base.h +++ b/include/sv_video_base.h @@ -411,6 +411,22 @@ cv::Mat drawTargetsInFrame( bool with_seg=false, bool with_box=false ); +int findClosestTargetID(sv::TargetsInFrame& lastTgts, int clickX, int clickY); + +void drawSpecificTargetsInFrame( + cv::Mat& img_, + const TargetsInFrame& tgts_, + int clicked_id, + bool with_all=true, + bool with_category=false, + bool with_tid=false, + bool with_seg=false, + bool with_box=false, + bool with_ell=false, + bool with_aruco=false, + bool with_yaw=false +); + std::string get_home(); bool is_file_exist(std::string& fn); void list_dir(std::string dir, std::vector& files, std::string suffixs="", bool r=false); diff --git a/video_io/sv_video_base.cpp b/video_io/sv_video_base.cpp index 60fdfa1..c20d225 100644 --- a/video_io/sv_video_base.cpp +++ b/video_io/sv_video_base.cpp @@ -519,6 +519,128 @@ cv::Mat drawTargetsInFrame( } +void drawSpecificTargetsInFrame( + cv::Mat& img_, + const TargetsInFrame& tgts_, + int clicked_id, + bool with_all, + bool with_category, + bool with_tid, + bool with_seg, + bool with_box, + bool with_ell, + bool with_aruco, + bool with_yaw +) +{ + + + //std::cout<<"go in void function"< 0) + { + cv::Mat image_ret; + cv::addWeighted(img_, 0.5, cv::Mat::zeros(cv::Size(img_.cols, img_.rows), CV_8UC3), 0, 0, image_ret); + cv::Rect roi = cv::Rect(tgts_.rois[0].x1, tgts_.rois[0].y1, tgts_.rois[0].x2 - tgts_.rois[0].x1, tgts_.rois[0].y2 - tgts_.rois[0].y1); + img_(roi).copyTo(image_ret(roi)); + image_ret.copyTo(img_); + } + std::vector > aruco_corners; + std::vector aruco_ids; + + //int i = 0; + //for (Target tgt : tgts_.targets) + for (int i=0; i a_corners; + int a_id; + if (((Target)tgts_.targets[i]).getAruco(a_id, a_corners)) { aruco_ids.push_back(a_id); aruco_corners.push_back(a_corners); } + } + if ((with_all || with_box) && tgts_.targets[i].has_box) + { + Box b; + ((Target)tgts_.targets[i]).getBox(b); + cv::rectangle(img_, cv::Rect(b.x1, b.y1, b.x2-b.x1+1, b.y2-b.y1+1), cv::Scalar(0,0,255), 1, 1, 0); + if ((with_all || with_category) && tgts_.targets[i].has_category) + { + cv::putText(img_, tgts_.targets[i].category, cv::Point(b.x1, b.y1-4), cv::FONT_HERSHEY_DUPLEX, 0.4, cv::Scalar(255,0,0)); + } + if ((with_all || with_tid) && tgts_.targets[i].has_tid) + { + char tmp[32]; + sprintf(tmp, "TID: %d", tgts_.targets[i].tracked_id); + cv::putText(img_, tmp, cv::Point(b.x1, b.y1-14), cv::FONT_HERSHEY_DUPLEX, 0.4, cv::Scalar(0,0,255)); + } + } + if ((with_all || with_ell) && tgts_.targets[i].has_ell) + { + double xc, yc, a, b, rad; + + } + if ((with_all || with_seg) && tgts_.targets[i].has_seg) + { + + std::cout<<"here is mask "< > contours; + std::vector hierarchy; + + cv::findContours(mask, contours, hierarchy, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE); + cv::Mat mask_disp = img_.clone(); + cv::fillPoly(mask_disp, contours, cv::Scalar(255,255,255), cv::LINE_AA); + cv::polylines(img_, contours, true, cv::Scalar(255,255,255), 2, cv::LINE_AA); + + double alpha = 0.6; + cv::addWeighted(img_, alpha, mask_disp, 1.0-alpha, 0, img_); + } + + if ((with_all || with_aruco) && aruco_ids.size() > 0) + { + cv::aruco::drawDetectedMarkers(img_, aruco_corners, aruco_ids); + } + } +} + + +int findClosestTargetID(sv::TargetsInFrame& lastTgts, int clickX, int clickY) { + std::set> distancesAndIDs; // 存储距离平方和对应的tracked_id + for (int i = 0; i < lastTgts.targets.size(); i++) { + int halfWidth = static_cast((lastTgts.targets[i].w * lastTgts.width) / 2); + int halfHeight = static_cast((lastTgts.targets[i].h * lastTgts.height) / 2); + int x = static_cast(lastTgts.targets[i].cx * lastTgts.width); + int y = static_cast(lastTgts.targets[i].cy * lastTgts.height); + + int diffX = x - clickX; + int diffY = y - clickY; + + if ((abs(diffX) < halfWidth) && (abs(diffY) < halfHeight)) { + int distanceSquared = diffX * diffX + diffY * diffY; + distancesAndIDs.insert({distanceSquared, lastTgts.targets[i].tracked_id}); + } + } + + if (!distancesAndIDs.empty()) { + // 返回距离最近的目标检测框的ID + return distancesAndIDs.begin()->second; + } else { + // 如果没有找到任何框,则返回-1 + return -1; + } +} + + std::string Target::getJsonStr() { std::string json_str = "{"; @@ -1349,6 +1471,4 @@ void VideoStreamerBase::releaseImpl() } - -} - +} \ No newline at end of file