@camera.ui/server 0.0.50-internal.0 → 0.0.50-internal.2
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.
- package/dist/interface/index.html +44 -44
- package/dist/interface/js/{@primevue.OhxoO3MD.0.0.50-internal.0.js → @primevue.BAIU_p3r.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@tanstack.D1IL6eOv.0.0.50-internal.0.js → @tanstack.mdCorqzE.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@vee-validate.BGPyWWTh.0.0.50-internal.0.js → @vee-validate.D0vsSsly.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{@vueuse.BsKtqdiG.0.0.50-internal.0.js → @vueuse.we5ZpWr2.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Adminpanel.D93Kvbwp.0.0.50-internal.0.js → Adminpanel.9AEBJ3H1.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Camera.DF2l3OMA.0.0.50-internal.0.js → Camera.CZcnEH0C.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Cameras.YzvZccdv.0.0.50-internal.0.js → Cameras.DE0LkcGu.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/Cammesh.CVvmkelB.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{Camview.CB7_HnoQ.0.0.50-internal.0.js → Camview.CUr4pGoU.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Config.BwflsWTm.0.0.50-internal.0.js → Config.CaJhu4fF.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/{Console.DZM8pN8Q.0.0.50-internal.0.js → Console.5VUmgryj.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiConsole.BXXU7Gth.0.0.50-internal.0.js → CuiConsole.iYmUxAR5.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiPluginCard.YFOrpbVD.0.0.50-internal.0.js → CuiPluginCard.DXPyE5mF.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{CuiTimeline.VV5KSJd5.0.0.50-internal.0.js → CuiTimeline.BqtlOFnV.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{FirstSteps.b-nvymgb.0.0.50-internal.0.js → FirstSteps.C_RI-SDQ.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Plugin.BOMpVEwM.0.0.50-internal.0.js → Plugin.Ch_v02eN.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{Plugins.DdPwaUDA.0.0.50-internal.0.js → Plugins.BpXAYgSG.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/Recordings.CIKHJytH.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{Settings.D24ttaPu.0.0.50-internal.0.js → Settings.BcLoGNEy.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsAccount.ms3aqz4E.0.0.50-internal.0.js → SettingsAccount.DMROW8kx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/SettingsAppearance.CUaHpihp.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{SettingsAppearance.vue_vue_type_script_setup_true_lang.CBQ6lL3T.0.0.50-internal.0.js → SettingsAppearance.vue_vue_type_script_setup_true_lang.BuKZ-Uco.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsBackup.BPEc4Rjg.0.0.50-internal.0.js → SettingsBackup.0QdwFSpv.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/SettingsRecordings.B-aj0U8_.0.0.50-internal.2.js +1 -0
- package/dist/interface/js/{SettingsRemote.BL5nXbUT.0.0.50-internal.0.js → SettingsRemote.Bi1YAJ76.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsSystem.D7T0AIpm.0.0.50-internal.0.js → SettingsSystem.CAx66Iir.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{SettingsUsers.1u0vCOVG.0.0.50-internal.0.js → SettingsUsers.CQcDtGy1.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{VersionsHandler.vue_vue_type_script_setup_true_lang.xDishkkS.0.0.50-internal.0.js → VersionsHandler.vue_vue_type_script_setup_true_lang.BhXMzIhV.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{ace-builds.D1nmvCwb.0.0.50-internal.0.js → ace-builds.C0sCXSu5.0.0.50-internal.2.js} +2 -2
- package/dist/interface/js/{ace.config.G96T2z54.0.0.50-internal.0.js → ace.config.DNqPWa0Q.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{backup.B_Gzxtp_.0.0.50-internal.0.js → backup.DAXgG3bP.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{chart.js.CP_nMnnf.0.0.50-internal.0.js → chart.js.Bq3YocRX.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{close-circle.DYLuVIOg.0.0.50-internal.0.js → close-circle.9rxyNw0z.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{dnd-core.T9OeW7mu.0.0.50-internal.0.js → dnd-core.BuEvHAsS.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{draggabilly.D3zGcBb3.0.0.50-internal.0.js → draggabilly.DUdE08x8.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{engine.io-client.kITRnq-g.0.0.50-internal.0.js → engine.io-client.DWU6YI8o.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{fast-deep-equal.Bpc9mIsj.0.0.50-internal.0.js → fast-deep-equal.BpPyC6E4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{highlight.js.BlSXU-Wb.0.0.50-internal.0.js → highlight.js.BoR2Rhdd.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{linkify-it.C3N1lWsJ.0.0.50-internal.0.js → linkify-it.BXzPONHs.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{main.D0YR3Jat.0.0.50-internal.0.js → main.DwcBYfWc.0.0.50-internal.2.js} +3 -3
- package/dist/interface/js/{markdown-it.Dj0dt5s2.0.0.50-internal.0.js → markdown-it.BUDVOjPt.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{nprogress.BwQWDcGj.0.0.50-internal.0.js → nprogress.CsG-OBoI.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{pinia.DRh7plEC.0.0.50-internal.0.js → pinia.CqEQao5R.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{primevue.Cl58krXf.0.0.50-internal.0.js → primevue.D91sslRx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{qrcode.C1sDj6P8.0.0.50-internal.0.js → qrcode.SdSTPzZO.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{react-dnd-touch-backend.BA4WhUJo.0.0.50-internal.0.js → react-dnd-touch-backend.BwroebQ4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{refresh-rounded.D_SmhhUf.0.0.50-internal.0.js → refresh-rounded.DxM48YSv.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{rxjs.C-fTBwEO.0.0.50-internal.0.js → rxjs.Cmpbnzo4.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{socket.io-client.DKrRxgjP.0.0.50-internal.0.js → socket.io-client.DF2YgZo1.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{socket.io-parser.EXj3YDH2.0.0.50-internal.0.js → socket.io-parser.BUs2ineY.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{system.CY8rGd-Q.0.0.50-internal.0.js → system.DmkT2LKx.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{trash-fill.CMnCN3Oy.0.0.50-internal.0.js → trash-fill.dPzyZDVa.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{unidragger.D0w6Tqtt.0.0.50-internal.0.js → unidragger.y2ZlFveS.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vee-validate.BeiObIH8.0.0.50-internal.0.js → vee-validate.Y-alCADW.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-chartjs.DtdZdiYw.0.0.50-internal.0.js → vue-chartjs.sRVFTqDf.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-i18n.BW2bx_6z.0.0.50-internal.0.js → vue-i18n.D5WrXOZa.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-inline-svg.BJkQGmKz.0.0.50-internal.0.js → vue-inline-svg.R0uz_abA.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-router.B2mOXHaC.0.0.50-internal.0.js → vue-router.65mnGy-o.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue-zoomable.BKDyCJE7.0.0.50-internal.0.js → vue-zoomable.B1Qop6Uu.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{vue3-dnd.DRK24CBp.0.0.50-internal.0.js → vue3-dnd.CwmyAcir.0.0.50-internal.2.js} +1 -1
- package/dist/interface/js/{zoom-out.DxvzgVEo.0.0.50-internal.0.js → zoom-out.CMPALvRh.0.0.50-internal.2.js} +1 -1
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +1 -1
- package/dist/server/src/rpc/server.js +4 -1
- package/dist/server/src/rpc/server.js.map +1 -1
- package/package.json +1 -1
- package/.prettierignore +0 -12
- package/.prettierrc.json +0 -12
- package/artillery.yaml +0 -29
- package/bin/cameraui-server.ts +0 -11
- package/dist/interface/js/Cammesh.D-6dAROQ.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/Recordings.DhxjIW7e.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/SettingsAppearance.DsTjKXk1.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/SettingsRecordings.DgW7M0jj.0.0.50-internal.0.js +0 -1
- package/eslint.config.js +0 -103
- package/localdeps.txt +0 -10
- package/mypy.ini +0 -30
- package/requirements.txt +0 -15
- package/ruff.toml +0 -90
- package/src/__init__.py +0 -0
- package/src/_camera_ui_tools/__init__.py +0 -0
- package/src/_camera_ui_tools/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/api/controllers/api.controller.ts +0 -19
- package/src/api/controllers/auth.controller.ts +0 -294
- package/src/api/controllers/backup.controller.ts +0 -72
- package/src/api/controllers/cameras.controller.ts +0 -1029
- package/src/api/controllers/config.controller.ts +0 -102
- package/src/api/controllers/files.controller.ts +0 -35
- package/src/api/controllers/frameWorkers.controller.ts +0 -109
- package/src/api/controllers/plugins.controller.ts +0 -1206
- package/src/api/controllers/system.controller.ts +0 -273
- package/src/api/controllers/users.controller.ts +0 -648
- package/src/api/database/checks.ts +0 -268
- package/src/api/database/constants.ts +0 -8
- package/src/api/database/index.ts +0 -262
- package/src/api/database/migration.ts +0 -62
- package/src/api/database/selfcheck.ts +0 -492
- package/src/api/database/types.ts +0 -104
- package/src/api/go2rtc/api/application.ts +0 -48
- package/src/api/go2rtc/api/config.ts +0 -61
- package/src/api/go2rtc/api/discover.ts +0 -197
- package/src/api/go2rtc/api/index.ts +0 -49
- package/src/api/go2rtc/api/snapshot.ts +0 -44
- package/src/api/go2rtc/api/streams.ts +0 -168
- package/src/api/go2rtc/index.ts +0 -43
- package/src/api/go2rtc/queue.ts +0 -50
- package/src/api/go2rtc/types.ts +0 -174
- package/src/api/index.ts +0 -286
- package/src/api/middlewares/authPermission.middleware.ts +0 -46
- package/src/api/middlewares/authValidation.middleware.ts +0 -160
- package/src/api/middlewares/pagination.middleware.ts +0 -67
- package/src/api/middlewares/socketAuth.middleware.ts +0 -136
- package/src/api/plugins/header.plugin.ts +0 -15
- package/src/api/plugins/logger.plugin.ts +0 -44
- package/src/api/plugins/proxy.plugin.ts +0 -255
- package/src/api/plugins/socket.plugin.ts +0 -28
- package/src/api/plugins/system.plugin.ts +0 -48
- package/src/api/plugins/useragent.plugin.ts +0 -19
- package/src/api/routes/api.routes.ts +0 -10
- package/src/api/routes/auth.routes.ts +0 -56
- package/src/api/routes/backup.routes.ts +0 -28
- package/src/api/routes/cameras.routes.ts +0 -281
- package/src/api/routes/config.routes.ts +0 -66
- package/src/api/routes/files.routes.ts +0 -15
- package/src/api/routes/frameWorkers.routes.ts +0 -39
- package/src/api/routes/index.ts +0 -37
- package/src/api/routes/plugins.routes.ts +0 -420
- package/src/api/routes/system.routes.ts +0 -101
- package/src/api/routes/users.routes.ts +0 -167
- package/src/api/schemas/backup.schema.ts +0 -112
- package/src/api/schemas/cameras.schema.ts +0 -479
- package/src/api/schemas/config.schema.ts +0 -38
- package/src/api/schemas/go2rtc.schema.ts +0 -189
- package/src/api/schemas/plugins.schema.ts +0 -126
- package/src/api/schemas/storage.schema.ts +0 -11
- package/src/api/schemas/system.schema.ts +0 -45
- package/src/api/schemas/users.schema.ts +0 -185
- package/src/api/services/auth.service.ts +0 -210
- package/src/api/services/backup.service.ts +0 -144
- package/src/api/services/cameras.service.ts +0 -671
- package/src/api/services/plugins.service.ts +0 -470
- package/src/api/services/system.service.ts +0 -85
- package/src/api/services/users.service.ts +0 -276
- package/src/api/types/index.ts +0 -675
- package/src/api/utils/cert.ts +0 -254
- package/src/api/utils/constants.ts +0 -17
- package/src/api/utils/fetch.ts +0 -21
- package/src/api/utils/moveFiles.ts +0 -45
- package/src/api/utils/parse.ts +0 -17
- package/src/api/websocket/index.ts +0 -110
- package/src/api/websocket/nsp/logs.ts +0 -240
- package/src/api/websocket/nsp/main.ts +0 -27
- package/src/api/websocket/nsp/metrics.ts +0 -301
- package/src/api/websocket/nsp/notifications.ts +0 -43
- package/src/api/websocket/nsp/plugins.ts +0 -37
- package/src/api/websocket/nsp/server.ts +0 -220
- package/src/api/websocket/nsp/status.ts +0 -77
- package/src/api/websocket/types.ts +0 -55
- package/src/api.ts +0 -163
- package/src/camera/classes.ts +0 -32
- package/src/camera/controller.ts +0 -579
- package/src/camera/device.ts +0 -422
- package/src/camera/frameWorker.ts +0 -403
- package/src/camera/index.ts +0 -679
- package/src/camera/interfaces.ts +0 -95
- package/src/camera/iou.ts +0 -153
- package/src/camera/polygon.ts +0 -226
- package/src/camera/python/__init__.py +0 -0
- package/src/camera/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/classes.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/delegate_controller.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/interfaces.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/iou.cpython-310.pyc +0 -0
- package/src/camera/python/__pycache__/iou.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/iou2.cpython-310.pyc +0 -0
- package/src/camera/python/__pycache__/polygon.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/video_frame.cpython-311.pyc +0 -0
- package/src/camera/python/classes.py +0 -41
- package/src/camera/python/interfaces.py +0 -130
- package/src/camera/python/iou.py +0 -158
- package/src/camera/python/polygon.py +0 -230
- package/src/camera/python/test/__pycache__/polygon.cpython-310.pyc +0 -0
- package/src/camera/python/test/iou_test.py +0 -799
- package/src/camera/python/test/polygon.py +0 -238
- package/src/camera/python/test/polygon_test.py +0 -256
- package/src/camera/python/test/polygon_test2.py +0 -484
- package/src/camera/python/typings.py +0 -50
- package/src/camera/python/video_frame.py +0 -143
- package/src/camera/session.ts +0 -192
- package/src/camera/streaming/fmp4-session.ts +0 -390
- package/src/camera/streaming/peer-connection.ts +0 -273
- package/src/camera/streaming/rtsp-session.ts +0 -331
- package/src/camera/streaming/webrtc-connection.ts +0 -260
- package/src/camera/streaming/werift-session.ts +0 -317
- package/src/camera/test/iou_test.ts +0 -761
- package/src/camera/test/polygon.test.ts +0 -611
- package/src/camera/test/polygon_test.ts +0 -210
- package/src/camera/types.ts +0 -48
- package/src/camera/utils.ts +0 -489
- package/src/camera/videoFrame.ts +0 -123
- package/src/cloud/index.ts +0 -61
- package/src/cloud/remote/cloudflare.ts +0 -18
- package/src/cloud/remote/upnp.ts +0 -18
- package/src/cloud/remote/utils.ts +0 -24
- package/src/cloud/types.ts +0 -16
- package/src/decoder/child.ts +0 -883
- package/src/decoder/imageUtils.ts +0 -275
- package/src/decoder/manager.ts +0 -251
- package/src/decoder/python/__init__.py +0 -0
- package/src/decoder/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/image_utils.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/utils.cpython-311.pyc +0 -0
- package/src/decoder/python/child.py +0 -903
- package/src/decoder/python/image_utils.py +0 -196
- package/src/decoder/python/pool.py +0 -45
- package/src/decoder/python/test/group.py +0 -62
- package/src/decoder/python/test/motion.mp4 +0 -0
- package/src/decoder/python/test/motion2.mp4 +0 -0
- package/src/decoder/python/test/opencl.cl +0 -70
- package/src/decoder/python/test/opencl2.cl +0 -130
- package/src/decoder/python/test/test.py +0 -427
- package/src/decoder/python/test/test1.jpg +0 -0
- package/src/decoder/python/test/test1_resized.jpg +0 -0
- package/src/decoder/python/test/test2.jpg +0 -0
- package/src/decoder/python/test/test2.py +0 -451
- package/src/decoder/python/test/test2_resized.jpg +0 -0
- package/src/decoder/python/test/test3.jpg +0 -0
- package/src/decoder/python/test/utils.py +0 -50
- package/src/decoder/python/typings.py +0 -57
- package/src/decoder/python/utils.py +0 -70
- package/src/decoder/test/child.ts +0 -117
- package/src/decoder/test/ffmpeg.ts +0 -371
- package/src/decoder/test/test.ts +0 -182
- package/src/decoder/types.ts +0 -27
- package/src/decoder/utils.ts +0 -64
- package/src/decoder/wasm/asconfig.json +0 -28
- package/src/decoder/wasm/assembly/console.ts +0 -1
- package/src/decoder/wasm/assembly/index.ts +0 -890
- package/src/decoder/wasm/build/decoder.d.ts +0 -43
- package/src/decoder/wasm/build/decoder.js +0 -108
- package/src/decoder/wasm/build/decoder.wasm +0 -0
- package/src/decoder/wasm/tsconfig.json +0 -5
- package/src/decoder/worker.ts +0 -113
- package/src/go2rtc/index.ts +0 -324
- package/src/go2rtc/types.ts +0 -88
- package/src/main.ts +0 -267
- package/src/manager/coreManager.ts +0 -78
- package/src/manager/deviceManager.ts +0 -132
- package/src/manager/types.ts +0 -17
- package/src/plugins/index.ts +0 -443
- package/src/plugins/plugin.ts +0 -177
- package/src/plugins/runtime/base.ts +0 -282
- package/src/plugins/runtime/index.ts +0 -15
- package/src/plugins/runtime/node/child.ts +0 -193
- package/src/plugins/runtime/node/index.ts +0 -67
- package/src/plugins/runtime/node/plugin.ts +0 -122
- package/src/plugins/runtime/node/pluginApi.ts +0 -27
- package/src/plugins/runtime/node/proxy/cameraDevice.ts +0 -299
- package/src/plugins/runtime/node/proxy/coreManager.ts +0 -128
- package/src/plugins/runtime/node/proxy/deviceManager.ts +0 -187
- package/src/plugins/runtime/node/storage.ts +0 -312
- package/src/plugins/runtime/node/storageController.ts +0 -91
- package/src/plugins/runtime/python/__init__.py +0 -0
- package/src/plugins/runtime/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/camera_storage.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/config_service.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/constants.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/ipc.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/logger.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/message_queue.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/namespaces.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin_api.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin_logger.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/proxy_utils.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/schema.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/storage.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/storage_controller.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/child.py +0 -248
- package/src/plugins/runtime/python/index.ts +0 -73
- package/src/plugins/runtime/python/namespaces.py +0 -101
- package/src/plugins/runtime/python/plugin.py +0 -155
- package/src/plugins/runtime/python/plugin_api.py +0 -29
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/core_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/camera_device.py +0 -1732
- package/src/plugins/runtime/python/proxy/core_manager.py +0 -126
- package/src/plugins/runtime/python/proxy/device_manager.py +0 -197
- package/src/plugins/runtime/python/schema.py +0 -99
- package/src/plugins/runtime/python/storage.py +0 -353
- package/src/plugins/runtime/python/storage_controller.py +0 -102
- package/src/plugins/runtime/python/typings.py +0 -195
- package/src/plugins/schema.ts +0 -472
- package/src/plugins/types.ts +0 -60
- package/src/plugins/worker.ts +0 -250
- package/src/rpc/index.ts +0 -149
- package/src/rpc/namespaces.ts +0 -79
- package/src/rpc/server.ts +0 -422
- package/src/rpc/types.ts +0 -119
- package/src/rpc/utils.ts +0 -16
- package/src/services/config/constants.ts +0 -47
- package/src/services/config/defaults.ts +0 -57
- package/src/services/config/index.ts +0 -744
- package/src/services/config/types.ts +0 -211
- package/src/services/logger/index.ts +0 -96
- package/src/types.ts +0 -47
- package/src/utils/path.ts +0 -16
- package/src/utils/pythonInstaller.ts +0 -597
- package/tsconfig.json +0 -37
- package/types/fastify.d.ts +0 -14
- package/updates.config.js +0 -3
- /package/dist/interface/assets/{@xterm.DYP7pi_n.0.0.50-internal.0.css → @xterm.DYP7pi_n.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Adminpanel.BKek2EMH.0.0.50-internal.0.css → Adminpanel.BKek2EMH.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Cameras.BDWZJqPN.0.0.50-internal.0.css → Cameras.BDWZJqPN.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Camview.BFUFMoNX.0.0.50-internal.0.css → Camview.BFUFMoNX.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiConsole.DCYyxdVg.0.0.50-internal.0.css → CuiConsole.DCYyxdVg.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiPluginCard.yF8V0SZY.0.0.50-internal.0.css → CuiPluginCard.yF8V0SZY.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{CuiTimeline.BkIwlYtw.0.0.50-internal.0.css → CuiTimeline.BkIwlYtw.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Plugin.DJElsAn5.0.0.50-internal.0.css → Plugin.DJElsAn5.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Plugins.0h77qnmN.0.0.50-internal.0.css → Plugins.0h77qnmN.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{Settings.CkgfRkQr.0.0.50-internal.0.css → Settings.CkgfRkQr.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{SettingsAccount.DeFul3eQ.0.0.50-internal.0.css → SettingsAccount.DeFul3eQ.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{SettingsBackup.CX0rT0QJ.0.0.50-internal.0.css → SettingsBackup.CX0rT0QJ.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{highlight.Ch2EwETz.0.0.50-internal.0.css → highlight.Ch2EwETz.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{logo-256.BCQk9H1-.0.0.50-internal.0.png → logo-256.BCQk9H1-.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{logo-512.DLKVOU2S.0.0.50-internal.0.png → logo-512.DLKVOU2S.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{logo.DmEiRk0z.0.0.50-internal.0.png → logo.DmEiRk0z.0.0.50-internal.2.png} +0 -0
- /package/dist/interface/assets/{main.Cip9LkS3.0.0.50-internal.0.css → main.Cip9LkS3.0.0.50-internal.2.css} +0 -0
- /package/dist/interface/assets/{mode-json.Br7xisR1.0.0.50-internal.0.js → mode-json.Br7xisR1.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{mode-yaml.CIYL8U3d.0.0.50-internal.0.js → mode-yaml.CIYL8U3d.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-base.jEXLGV2h.0.0.50-internal.0.js → worker-base.jEXLGV2h.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-json.DgwNIOck.0.0.50-internal.0.js → worker-json.DgwNIOck.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/assets/{worker-yaml.B3uUYINB.0.0.50-internal.0.js → worker-yaml.B3uUYINB.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@babel.l0sNRNKZ.0.0.50-internal.0.js → @babel.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@intlify.BkGPX90O.0.0.50-internal.0.js → @intlify.BkGPX90O.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@kurkle.D8fDXNIl.0.0.50-internal.0.js → @kurkle.D8fDXNIl.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@primeuix.BFAY2Bk9.0.0.50-internal.0.js → @primeuix.BFAY2Bk9.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@react-dnd.CcwRs9xb.0.0.50-internal.0.js → @react-dnd.CcwRs9xb.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@socket.io.Dkula2eQ.0.0.50-internal.0.js → @socket.io.Dkula2eQ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@vue.B5vqhCp2.0.0.50-internal.0.js → @vue.B5vqhCp2.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{@xterm.CAa7rpjv.0.0.50-internal.0.js → @xterm.C-5Lxnx_.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{axios.DHr9lByg.0.0.50-internal.0.js → axios.DHr9lByg.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{birpc.l0sNRNKZ.0.0.50-internal.0.js → birpc.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{compare-versions.DqEOhma6.0.0.50-internal.0.js → compare-versions.DqEOhma6.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{dijkstrajs.C00ieaqj.0.0.50-internal.0.js → dijkstrajs.C00ieaqj.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{engine.io-parser.BiEtp6m2.0.0.50-internal.0.js → engine.io-parser.BiEtp6m2.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{entities.C20TfXL6.0.0.50-internal.0.js → entities.C20TfXL6.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{ev-emitter.X5f1qa-c.0.0.50-internal.0.js → ev-emitter.X5f1qa-c.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{get-size.D1dS-IaP.0.0.50-internal.0.js → get-size.D1dS-IaP.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{hookable.l0sNRNKZ.0.0.50-internal.0.js → hookable.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{mdurl.k9Sl0PQj.0.0.50-internal.0.js → mdurl.k9Sl0PQj.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{perfect-debounce.l0sNRNKZ.0.0.50-internal.0.js → perfect-debounce.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{primelocale.Bga3dOQu.0.0.50-internal.0.js → primelocale.Bga3dOQu.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{punycode.js.Dj65hjkv.0.0.50-internal.0.js → punycode.js.Dj65hjkv.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.0.js → react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{redux.BFxtlG_c.0.0.50-internal.0.js → redux.BFxtlG_c.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{tslib.9k7AwCpt.0.0.50-internal.0.js → tslib.9k7AwCpt.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{uc.micro.kMc2yuuw.0.0.50-internal.0.js → uc.micro.kMc2yuuw.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{uuid.C6aID195.0.0.50-internal.0.js → uuid.C6aID195.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{vue.l0sNRNKZ.0.0.50-internal.0.js → vue.l0sNRNKZ.0.0.50-internal.2.js} +0 -0
- /package/dist/interface/js/{zod.SKKegNRO.0.0.50-internal.0.js → zod.SKKegNRO.0.0.50-internal.2.js} +0 -0
|
@@ -1,761 +0,0 @@
|
|
|
1
|
-
import { mergeDetections } from '../iou.js';
|
|
2
|
-
|
|
3
|
-
import type { Detection } from '@camera.ui/types';
|
|
4
|
-
|
|
5
|
-
function createDetection(id: string, label: any, confidence: number, boundingBox: [number, number, number, number], inputWidth: number, inputHeight: number): Detection {
|
|
6
|
-
return {
|
|
7
|
-
id,
|
|
8
|
-
label,
|
|
9
|
-
confidence,
|
|
10
|
-
boundingBox,
|
|
11
|
-
inputWidth,
|
|
12
|
-
inputHeight,
|
|
13
|
-
origWidth: inputWidth,
|
|
14
|
-
origHeight: inputHeight,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface TestDetection {
|
|
19
|
-
name: string;
|
|
20
|
-
detections: Detection[];
|
|
21
|
-
}
|
|
22
|
-
[];
|
|
23
|
-
|
|
24
|
-
const cameraUiDetections: Detection[] = [
|
|
25
|
-
{
|
|
26
|
-
label: 'motion',
|
|
27
|
-
confidence: 1,
|
|
28
|
-
boundingBox: [490, 201, 505, 231],
|
|
29
|
-
inputWidth: 640,
|
|
30
|
-
inputHeight: 360,
|
|
31
|
-
origWidth: 2304,
|
|
32
|
-
origHeight: 1296,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: 'motion',
|
|
36
|
-
confidence: 1,
|
|
37
|
-
boundingBox: [522, 196, 542, 218],
|
|
38
|
-
inputWidth: 640,
|
|
39
|
-
inputHeight: 360,
|
|
40
|
-
origWidth: 2304,
|
|
41
|
-
origHeight: 1296,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: 'motion',
|
|
45
|
-
confidence: 1,
|
|
46
|
-
boundingBox: [140, 193, 159, 232],
|
|
47
|
-
inputWidth: 640,
|
|
48
|
-
inputHeight: 360,
|
|
49
|
-
origWidth: 2304,
|
|
50
|
-
origHeight: 1296,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
label: 'motion',
|
|
54
|
-
confidence: 1,
|
|
55
|
-
boundingBox: [540, 183, 556, 206],
|
|
56
|
-
inputWidth: 640,
|
|
57
|
-
inputHeight: 360,
|
|
58
|
-
origWidth: 2304,
|
|
59
|
-
origHeight: 1296,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: 'motion',
|
|
63
|
-
confidence: 1,
|
|
64
|
-
boundingBox: [504, 181, 525, 200],
|
|
65
|
-
inputWidth: 640,
|
|
66
|
-
inputHeight: 360,
|
|
67
|
-
origWidth: 2304,
|
|
68
|
-
origHeight: 1296,
|
|
69
|
-
},
|
|
70
|
-
];
|
|
71
|
-
|
|
72
|
-
const cameraUiDetections2: Detection[] = [
|
|
73
|
-
{
|
|
74
|
-
label: 'motion',
|
|
75
|
-
confidence: 1,
|
|
76
|
-
boundingBox: [351, 333, 372, 360],
|
|
77
|
-
inputWidth: 640,
|
|
78
|
-
inputHeight: 360,
|
|
79
|
-
origWidth: 2304,
|
|
80
|
-
origHeight: 1296,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
label: 'motion',
|
|
84
|
-
confidence: 1,
|
|
85
|
-
boundingBox: [382, 279, 398, 314],
|
|
86
|
-
inputWidth: 640,
|
|
87
|
-
inputHeight: 360,
|
|
88
|
-
origWidth: 2304,
|
|
89
|
-
origHeight: 1296,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
label: 'motion',
|
|
93
|
-
confidence: 1,
|
|
94
|
-
boundingBox: [399, 276, 433, 360],
|
|
95
|
-
inputWidth: 640,
|
|
96
|
-
inputHeight: 360,
|
|
97
|
-
origWidth: 2304,
|
|
98
|
-
origHeight: 1296,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
label: 'motion',
|
|
102
|
-
confidence: 1,
|
|
103
|
-
boundingBox: [411, 95, 461, 275],
|
|
104
|
-
inputWidth: 640,
|
|
105
|
-
inputHeight: 360,
|
|
106
|
-
origWidth: 2304,
|
|
107
|
-
origHeight: 1296,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
label: 'motion',
|
|
111
|
-
confidence: 1,
|
|
112
|
-
boundingBox: [401, 90, 419, 120],
|
|
113
|
-
inputWidth: 640,
|
|
114
|
-
inputHeight: 360,
|
|
115
|
-
origWidth: 2304,
|
|
116
|
-
origHeight: 1296,
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
label: 'motion',
|
|
120
|
-
confidence: 1,
|
|
121
|
-
boundingBox: [271, 73, 414, 324],
|
|
122
|
-
inputWidth: 640,
|
|
123
|
-
inputHeight: 360,
|
|
124
|
-
origWidth: 2304,
|
|
125
|
-
origHeight: 1296,
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
label: 'motion',
|
|
129
|
-
confidence: 1,
|
|
130
|
-
boundingBox: [232, 5, 260, 25],
|
|
131
|
-
inputWidth: 640,
|
|
132
|
-
inputHeight: 360,
|
|
133
|
-
origWidth: 2304,
|
|
134
|
-
origHeight: 1296,
|
|
135
|
-
},
|
|
136
|
-
];
|
|
137
|
-
|
|
138
|
-
const cameraUiDetections3: Detection[] = [
|
|
139
|
-
{
|
|
140
|
-
label: 'motion',
|
|
141
|
-
confidence: 1,
|
|
142
|
-
boundingBox: [319, 212, 354, 316],
|
|
143
|
-
inputWidth: 640,
|
|
144
|
-
inputHeight: 360,
|
|
145
|
-
origWidth: 2304,
|
|
146
|
-
origHeight: 1296,
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
label: 'motion',
|
|
150
|
-
confidence: 1,
|
|
151
|
-
boundingBox: [361, 176, 396, 267],
|
|
152
|
-
inputWidth: 640,
|
|
153
|
-
inputHeight: 360,
|
|
154
|
-
origWidth: 2304,
|
|
155
|
-
origHeight: 1296,
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
label: 'motion',
|
|
159
|
-
confidence: 1,
|
|
160
|
-
boundingBox: [324, 164, 367, 199],
|
|
161
|
-
inputWidth: 640,
|
|
162
|
-
inputHeight: 360,
|
|
163
|
-
origWidth: 2304,
|
|
164
|
-
origHeight: 1296,
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
label: 'motion',
|
|
168
|
-
confidence: 1,
|
|
169
|
-
boundingBox: [338, 102, 358, 124],
|
|
170
|
-
inputWidth: 640,
|
|
171
|
-
inputHeight: 360,
|
|
172
|
-
origWidth: 2304,
|
|
173
|
-
origHeight: 1296,
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
label: 'motion',
|
|
177
|
-
confidence: 1,
|
|
178
|
-
boundingBox: [287, 76, 405, 316],
|
|
179
|
-
inputWidth: 640,
|
|
180
|
-
inputHeight: 360,
|
|
181
|
-
origWidth: 2304,
|
|
182
|
-
origHeight: 1296,
|
|
183
|
-
},
|
|
184
|
-
];
|
|
185
|
-
|
|
186
|
-
const cameraUiDetections4: Detection[] = [
|
|
187
|
-
{
|
|
188
|
-
label: 'motion',
|
|
189
|
-
confidence: 1,
|
|
190
|
-
boundingBox: [402, 347, 436, 360],
|
|
191
|
-
inputWidth: 640,
|
|
192
|
-
inputHeight: 360,
|
|
193
|
-
origWidth: 2304,
|
|
194
|
-
origHeight: 1296,
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
label: 'motion',
|
|
198
|
-
confidence: 1,
|
|
199
|
-
boundingBox: [49, 342, 81, 360],
|
|
200
|
-
inputWidth: 640,
|
|
201
|
-
inputHeight: 360,
|
|
202
|
-
origWidth: 2304,
|
|
203
|
-
origHeight: 1296,
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
label: 'motion',
|
|
207
|
-
confidence: 1,
|
|
208
|
-
boundingBox: [126, 332, 148, 360],
|
|
209
|
-
inputWidth: 640,
|
|
210
|
-
inputHeight: 360,
|
|
211
|
-
origWidth: 2304,
|
|
212
|
-
origHeight: 1296,
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
label: 'motion',
|
|
216
|
-
confidence: 1,
|
|
217
|
-
boundingBox: [348, 329, 386, 360],
|
|
218
|
-
inputWidth: 640,
|
|
219
|
-
inputHeight: 360,
|
|
220
|
-
origWidth: 2304,
|
|
221
|
-
origHeight: 1296,
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
label: 'motion',
|
|
225
|
-
confidence: 1,
|
|
226
|
-
boundingBox: [409, 328, 436, 348],
|
|
227
|
-
inputWidth: 640,
|
|
228
|
-
inputHeight: 360,
|
|
229
|
-
origWidth: 2304,
|
|
230
|
-
origHeight: 1296,
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
label: 'motion',
|
|
234
|
-
confidence: 1,
|
|
235
|
-
boundingBox: [317, 302, 334, 326],
|
|
236
|
-
inputWidth: 640,
|
|
237
|
-
inputHeight: 360,
|
|
238
|
-
origWidth: 2304,
|
|
239
|
-
origHeight: 1296,
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
label: 'motion',
|
|
243
|
-
confidence: 1,
|
|
244
|
-
boundingBox: [347, 297, 358, 331],
|
|
245
|
-
inputWidth: 640,
|
|
246
|
-
inputHeight: 360,
|
|
247
|
-
origWidth: 2304,
|
|
248
|
-
origHeight: 1296,
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
label: 'motion',
|
|
252
|
-
confidence: 1,
|
|
253
|
-
boundingBox: [201, 294, 222, 311],
|
|
254
|
-
inputWidth: 640,
|
|
255
|
-
inputHeight: 360,
|
|
256
|
-
origWidth: 2304,
|
|
257
|
-
origHeight: 1296,
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
label: 'motion',
|
|
261
|
-
confidence: 1,
|
|
262
|
-
boundingBox: [275, 278, 299, 360],
|
|
263
|
-
inputWidth: 640,
|
|
264
|
-
inputHeight: 360,
|
|
265
|
-
origWidth: 2304,
|
|
266
|
-
origHeight: 1296,
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
label: 'motion',
|
|
270
|
-
confidence: 1,
|
|
271
|
-
boundingBox: [312, 274, 333, 306],
|
|
272
|
-
inputWidth: 640,
|
|
273
|
-
inputHeight: 360,
|
|
274
|
-
origWidth: 2304,
|
|
275
|
-
origHeight: 1296,
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
label: 'motion',
|
|
279
|
-
confidence: 1,
|
|
280
|
-
boundingBox: [565, 268, 595, 299],
|
|
281
|
-
inputWidth: 640,
|
|
282
|
-
inputHeight: 360,
|
|
283
|
-
origWidth: 2304,
|
|
284
|
-
origHeight: 1296,
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
label: 'motion',
|
|
288
|
-
confidence: 1,
|
|
289
|
-
boundingBox: [200, 267, 218, 289],
|
|
290
|
-
inputWidth: 640,
|
|
291
|
-
inputHeight: 360,
|
|
292
|
-
origWidth: 2304,
|
|
293
|
-
origHeight: 1296,
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
label: 'motion',
|
|
297
|
-
confidence: 1,
|
|
298
|
-
boundingBox: [123, 232, 197, 316],
|
|
299
|
-
inputWidth: 640,
|
|
300
|
-
inputHeight: 360,
|
|
301
|
-
origWidth: 2304,
|
|
302
|
-
origHeight: 1296,
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
label: 'motion',
|
|
306
|
-
confidence: 1,
|
|
307
|
-
boundingBox: [297, 230, 327, 242],
|
|
308
|
-
inputWidth: 640,
|
|
309
|
-
inputHeight: 360,
|
|
310
|
-
origWidth: 2304,
|
|
311
|
-
origHeight: 1296,
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
label: 'motion',
|
|
315
|
-
confidence: 1,
|
|
316
|
-
boundingBox: [7, 217, 155, 343],
|
|
317
|
-
inputWidth: 640,
|
|
318
|
-
inputHeight: 360,
|
|
319
|
-
origWidth: 2304,
|
|
320
|
-
origHeight: 1296,
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
label: 'motion',
|
|
324
|
-
confidence: 1,
|
|
325
|
-
boundingBox: [250, 110, 345, 243],
|
|
326
|
-
inputWidth: 640,
|
|
327
|
-
inputHeight: 360,
|
|
328
|
-
origWidth: 2304,
|
|
329
|
-
origHeight: 1296,
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
label: 'motion',
|
|
333
|
-
confidence: 1,
|
|
334
|
-
boundingBox: [345, 70, 406, 326],
|
|
335
|
-
inputWidth: 640,
|
|
336
|
-
inputHeight: 360,
|
|
337
|
-
origWidth: 2304,
|
|
338
|
-
origHeight: 1296,
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
label: 'motion',
|
|
342
|
-
confidence: 1,
|
|
343
|
-
boundingBox: [376, 59, 396, 90],
|
|
344
|
-
inputWidth: 640,
|
|
345
|
-
inputHeight: 360,
|
|
346
|
-
origWidth: 2304,
|
|
347
|
-
origHeight: 1296,
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
label: 'motion',
|
|
351
|
-
confidence: 1,
|
|
352
|
-
boundingBox: [297, 58, 341, 124],
|
|
353
|
-
inputWidth: 640,
|
|
354
|
-
inputHeight: 360,
|
|
355
|
-
origWidth: 2304,
|
|
356
|
-
origHeight: 1296,
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
label: 'motion',
|
|
360
|
-
confidence: 1,
|
|
361
|
-
boundingBox: [550, 39, 606, 73],
|
|
362
|
-
inputWidth: 640,
|
|
363
|
-
inputHeight: 360,
|
|
364
|
-
origWidth: 2304,
|
|
365
|
-
origHeight: 1296,
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
label: 'motion',
|
|
369
|
-
confidence: 1,
|
|
370
|
-
boundingBox: [192, 27, 235, 80],
|
|
371
|
-
inputWidth: 640,
|
|
372
|
-
inputHeight: 360,
|
|
373
|
-
origWidth: 2304,
|
|
374
|
-
origHeight: 1296,
|
|
375
|
-
},
|
|
376
|
-
];
|
|
377
|
-
|
|
378
|
-
const cameraUiDetections5: Detection[] = [
|
|
379
|
-
{
|
|
380
|
-
label: 'motion',
|
|
381
|
-
confidence: 1,
|
|
382
|
-
boundingBox: [52, 324, 82, 360],
|
|
383
|
-
inputWidth: 640,
|
|
384
|
-
inputHeight: 360,
|
|
385
|
-
origWidth: 2304,
|
|
386
|
-
origHeight: 1296,
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
label: 'motion',
|
|
390
|
-
confidence: 1,
|
|
391
|
-
boundingBox: [399, 307, 449, 360],
|
|
392
|
-
inputWidth: 640,
|
|
393
|
-
inputHeight: 360,
|
|
394
|
-
origWidth: 2304,
|
|
395
|
-
origHeight: 1296,
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
label: 'motion',
|
|
399
|
-
confidence: 1,
|
|
400
|
-
boundingBox: [530, 294, 560, 311],
|
|
401
|
-
inputWidth: 640,
|
|
402
|
-
inputHeight: 360,
|
|
403
|
-
origWidth: 2304,
|
|
404
|
-
origHeight: 1296,
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
label: 'motion',
|
|
408
|
-
confidence: 1,
|
|
409
|
-
boundingBox: [156, 290, 227, 360],
|
|
410
|
-
inputWidth: 640,
|
|
411
|
-
inputHeight: 360,
|
|
412
|
-
origWidth: 2304,
|
|
413
|
-
origHeight: 1296,
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
label: 'motion',
|
|
417
|
-
confidence: 1,
|
|
418
|
-
boundingBox: [314, 279, 334, 320],
|
|
419
|
-
inputWidth: 640,
|
|
420
|
-
inputHeight: 360,
|
|
421
|
-
origWidth: 2304,
|
|
422
|
-
origHeight: 1296,
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
label: 'motion',
|
|
426
|
-
confidence: 1,
|
|
427
|
-
boundingBox: [554, 219, 624, 300],
|
|
428
|
-
inputWidth: 640,
|
|
429
|
-
inputHeight: 360,
|
|
430
|
-
origWidth: 2304,
|
|
431
|
-
origHeight: 1296,
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
label: 'motion',
|
|
435
|
-
confidence: 1,
|
|
436
|
-
boundingBox: [0, 218, 227, 360],
|
|
437
|
-
inputWidth: 640,
|
|
438
|
-
inputHeight: 360,
|
|
439
|
-
origWidth: 2304,
|
|
440
|
-
origHeight: 1296,
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
label: 'motion',
|
|
444
|
-
confidence: 1,
|
|
445
|
-
boundingBox: [204, 166, 297, 346],
|
|
446
|
-
inputWidth: 640,
|
|
447
|
-
inputHeight: 360,
|
|
448
|
-
origWidth: 2304,
|
|
449
|
-
origHeight: 1296,
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
label: 'motion',
|
|
453
|
-
confidence: 1,
|
|
454
|
-
boundingBox: [254, 106, 302, 189],
|
|
455
|
-
inputWidth: 640,
|
|
456
|
-
inputHeight: 360,
|
|
457
|
-
origWidth: 2304,
|
|
458
|
-
origHeight: 1296,
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
label: 'motion',
|
|
462
|
-
confidence: 1,
|
|
463
|
-
boundingBox: [260, 76, 285, 121],
|
|
464
|
-
inputWidth: 640,
|
|
465
|
-
inputHeight: 360,
|
|
466
|
-
origWidth: 2304,
|
|
467
|
-
origHeight: 1296,
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
label: 'motion',
|
|
471
|
-
confidence: 1,
|
|
472
|
-
boundingBox: [296, 74, 409, 360],
|
|
473
|
-
inputWidth: 640,
|
|
474
|
-
inputHeight: 360,
|
|
475
|
-
origWidth: 2304,
|
|
476
|
-
origHeight: 1296,
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
label: 'motion',
|
|
480
|
-
confidence: 1,
|
|
481
|
-
boundingBox: [302, 45, 365, 112],
|
|
482
|
-
inputWidth: 640,
|
|
483
|
-
inputHeight: 360,
|
|
484
|
-
origWidth: 2304,
|
|
485
|
-
origHeight: 1296,
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
label: 'motion',
|
|
489
|
-
confidence: 1,
|
|
490
|
-
boundingBox: [0, 43, 22, 71],
|
|
491
|
-
inputWidth: 640,
|
|
492
|
-
inputHeight: 360,
|
|
493
|
-
origWidth: 2304,
|
|
494
|
-
origHeight: 1296,
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
label: 'motion',
|
|
498
|
-
confidence: 1,
|
|
499
|
-
boundingBox: [631, 41, 640, 83],
|
|
500
|
-
inputWidth: 640,
|
|
501
|
-
inputHeight: 360,
|
|
502
|
-
origWidth: 2304,
|
|
503
|
-
origHeight: 1296,
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
label: 'motion',
|
|
507
|
-
confidence: 1,
|
|
508
|
-
boundingBox: [549, 37, 627, 75],
|
|
509
|
-
inputWidth: 640,
|
|
510
|
-
inputHeight: 360,
|
|
511
|
-
origWidth: 2304,
|
|
512
|
-
origHeight: 1296,
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
label: 'motion',
|
|
516
|
-
confidence: 1,
|
|
517
|
-
boundingBox: [439, 34, 478, 52],
|
|
518
|
-
inputWidth: 640,
|
|
519
|
-
inputHeight: 360,
|
|
520
|
-
origWidth: 2304,
|
|
521
|
-
origHeight: 1296,
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
label: 'motion',
|
|
525
|
-
confidence: 1,
|
|
526
|
-
boundingBox: [507, 33, 548, 55],
|
|
527
|
-
inputWidth: 640,
|
|
528
|
-
inputHeight: 360,
|
|
529
|
-
origWidth: 2304,
|
|
530
|
-
origHeight: 1296,
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
label: 'motion',
|
|
534
|
-
confidence: 1,
|
|
535
|
-
boundingBox: [374, 28, 418, 101],
|
|
536
|
-
inputWidth: 640,
|
|
537
|
-
inputHeight: 360,
|
|
538
|
-
origWidth: 2304,
|
|
539
|
-
origHeight: 1296,
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
label: 'motion',
|
|
543
|
-
confidence: 1,
|
|
544
|
-
boundingBox: [190, 23, 239, 84],
|
|
545
|
-
inputWidth: 640,
|
|
546
|
-
inputHeight: 360,
|
|
547
|
-
origWidth: 2304,
|
|
548
|
-
origHeight: 1296,
|
|
549
|
-
},
|
|
550
|
-
];
|
|
551
|
-
|
|
552
|
-
const cameraUiDetections6: Detection[] = [
|
|
553
|
-
{
|
|
554
|
-
id: '9e732521-9f9e-4840-a09b-b621981751fd',
|
|
555
|
-
label: 'person',
|
|
556
|
-
confidence: 0.6787109375,
|
|
557
|
-
boundingBox: [466.5625, 195.0, 639.0625, 639.375],
|
|
558
|
-
inputWidth: 640,
|
|
559
|
-
inputHeight: 640,
|
|
560
|
-
origWidth: 2304,
|
|
561
|
-
origHeight: 1296,
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
id: '9644b70e-126e-4e17-9cdb-ef16f851a96e',
|
|
565
|
-
label: 'animal',
|
|
566
|
-
confidence: 0.5546875,
|
|
567
|
-
boundingBox: [169.140625, 281.875, 271.484375, 515.0],
|
|
568
|
-
inputWidth: 640,
|
|
569
|
-
inputHeight: 640,
|
|
570
|
-
origWidth: 2304,
|
|
571
|
-
origHeight: 1296,
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
id: '23e1aff7-c7f1-47f5-bc5d-affe8a852af7',
|
|
575
|
-
label: 'vehicle',
|
|
576
|
-
confidence: 0.4921875,
|
|
577
|
-
boundingBox: [241.7529296875, 581.30859375, 254.4970703125, 624.31640625],
|
|
578
|
-
inputWidth: 640,
|
|
579
|
-
inputHeight: 640,
|
|
580
|
-
origWidth: 2304,
|
|
581
|
-
origHeight: 1296,
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
id: '814448bb-14d8-4928-95c3-7b3427f971c4',
|
|
585
|
-
label: 'other',
|
|
586
|
-
confidence: 0.3056640625,
|
|
587
|
-
boundingBox: [77.578125, 521.328125, 140.703125, 639.296875],
|
|
588
|
-
inputWidth: 640,
|
|
589
|
-
inputHeight: 640,
|
|
590
|
-
origWidth: 2304,
|
|
591
|
-
origHeight: 1296,
|
|
592
|
-
},
|
|
593
|
-
];
|
|
594
|
-
|
|
595
|
-
const extendedMixedLabelsTest: TestDetection = {
|
|
596
|
-
name: 'Extended Mixed Labels',
|
|
597
|
-
detections: [
|
|
598
|
-
createDetection('1', 'person', 0.9, [100, 100, 200, 200], 640, 360),
|
|
599
|
-
createDetection('2', 'person', 0.85, [150, 150, 250, 250], 640, 360),
|
|
600
|
-
createDetection('3', 'car', 0.8, [300, 300, 400, 400], 640, 360),
|
|
601
|
-
createDetection('4', 'car', 0.75, [350, 350, 450, 450], 640, 360),
|
|
602
|
-
createDetection('5', 'bicycle', 0.7, [500, 500, 550, 550], 640, 360),
|
|
603
|
-
createDetection('6', 'motorcycle', 0.65, [520, 520, 570, 570], 640, 360),
|
|
604
|
-
createDetection('7', '', 0.6, [600, 600, 650, 650], 640, 360),
|
|
605
|
-
createDetection('8', 'person', 0.95, [180, 180, 280, 280], 640, 360),
|
|
606
|
-
],
|
|
607
|
-
};
|
|
608
|
-
|
|
609
|
-
const touchingBoxesTest: TestDetection = {
|
|
610
|
-
name: 'Touching Boxes',
|
|
611
|
-
detections: [
|
|
612
|
-
createDetection('1', 'motion', 0.9, [0, 0, 100, 100], 640, 360),
|
|
613
|
-
createDetection('2', 'motion', 0.8, [100, 0, 200, 100], 640, 360),
|
|
614
|
-
createDetection('3', 'motion', 0.7, [0, 100, 100, 200], 640, 360),
|
|
615
|
-
createDetection('4', 'motion', 0.6, [100, 100, 200, 200], 640, 360),
|
|
616
|
-
createDetection('5', 'motion', 0.5, [200, 0, 300, 300], 640, 360),
|
|
617
|
-
],
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
const testCases: TestDetection[] = [
|
|
621
|
-
{
|
|
622
|
-
name: 'Original test case',
|
|
623
|
-
detections: [
|
|
624
|
-
createDetection('1', 'motion', 0.9, [0, 0, 1000, 1000], 1000, 1000),
|
|
625
|
-
createDetection('2', 'motion', 0.8, [100, 100, 300, 300], 1000, 1000),
|
|
626
|
-
createDetection('3', 'motion', 0.7, [400, 400, 600, 600], 1000, 1000),
|
|
627
|
-
createDetection('4', 'motion', 0.6, [700, 700, 900, 900], 1000, 1000),
|
|
628
|
-
createDetection('5', 'motion', 0.75, [800, 800, 1100, 1100], 1000, 1000),
|
|
629
|
-
],
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
name: 'Multiple overlapping boxes',
|
|
633
|
-
detections: [
|
|
634
|
-
createDetection('1', 'motion', 0.9, [0, 0, 500, 500], 1000, 1000),
|
|
635
|
-
createDetection('2', 'motion', 0.8, [250, 250, 750, 750], 1000, 1000),
|
|
636
|
-
createDetection('3', 'motion', 0.7, [500, 500, 1000, 1000], 1000, 1000),
|
|
637
|
-
],
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
name: 'Boxes around the edges',
|
|
641
|
-
detections: [
|
|
642
|
-
createDetection('1', 'motion', 0.9, [400, 400, 600, 600], 1000, 1000),
|
|
643
|
-
createDetection('2', 'motion', 0.8, [0, 0, 200, 200], 1000, 1000),
|
|
644
|
-
createDetection('3', 'motion', 0.7, [800, 0, 1000, 200], 1000, 1000),
|
|
645
|
-
createDetection('4', 'motion', 0.6, [0, 800, 200, 1000], 1000, 1000),
|
|
646
|
-
createDetection('5', 'motion', 0.5, [800, 800, 1000, 1000], 1000, 1000),
|
|
647
|
-
],
|
|
648
|
-
},
|
|
649
|
-
{
|
|
650
|
-
name: 'Nested boxes',
|
|
651
|
-
detections: [
|
|
652
|
-
createDetection('1', 'motion', 0.9, [0, 0, 1000, 1000], 1000, 1000),
|
|
653
|
-
createDetection('2', 'motion', 0.8, [200, 200, 800, 800], 1000, 1000),
|
|
654
|
-
createDetection('3', 'motion', 0.7, [400, 400, 600, 600], 1000, 1000),
|
|
655
|
-
],
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
name: 'Many small boxes',
|
|
659
|
-
detections: [
|
|
660
|
-
[100, 100, 200, 200, 0.9],
|
|
661
|
-
[150, 150, 250, 250, 0.85],
|
|
662
|
-
[175, 175, 275, 275, 0.8],
|
|
663
|
-
[300, 300, 400, 400, 0.95],
|
|
664
|
-
[350, 350, 450, 450, 0.87],
|
|
665
|
-
[500, 100, 600, 200, 0.92],
|
|
666
|
-
[550, 150, 650, 250, 0.88],
|
|
667
|
-
[700, 700, 800, 800, 0.91],
|
|
668
|
-
[750, 750, 850, 850, 0.86],
|
|
669
|
-
[200, 500, 300, 600, 0.93],
|
|
670
|
-
].map(([x1, y1, x2, y2, confidence], i) => createDetection(`${i + 1}`, 'motion', confidence, [x1, y1, x2, y2], 1000, 1000)),
|
|
671
|
-
},
|
|
672
|
-
{
|
|
673
|
-
name: 'Mixed Labels',
|
|
674
|
-
detections: [
|
|
675
|
-
createDetection('1', 'person', 0.9, [100, 100, 200, 200], 640, 360),
|
|
676
|
-
createDetection('2', 'car', 0.8, [150, 150, 250, 250], 640, 360),
|
|
677
|
-
createDetection('3', 'vehicle', 0.85, [180, 180, 280, 280], 640, 360),
|
|
678
|
-
],
|
|
679
|
-
},
|
|
680
|
-
extendedMixedLabelsTest,
|
|
681
|
-
touchingBoxesTest,
|
|
682
|
-
{
|
|
683
|
-
name: 'camera.ui 1',
|
|
684
|
-
detections: cameraUiDetections,
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
name: 'camera.ui 2',
|
|
688
|
-
detections: cameraUiDetections2,
|
|
689
|
-
},
|
|
690
|
-
{
|
|
691
|
-
name: 'camera.ui 3',
|
|
692
|
-
detections: cameraUiDetections3,
|
|
693
|
-
},
|
|
694
|
-
{
|
|
695
|
-
name: 'camera.ui 4',
|
|
696
|
-
detections: cameraUiDetections4,
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
name: 'camera.ui 5',
|
|
700
|
-
detections: cameraUiDetections5,
|
|
701
|
-
},
|
|
702
|
-
{
|
|
703
|
-
name: 'camera.ui 6',
|
|
704
|
-
detections: cameraUiDetections6,
|
|
705
|
-
},
|
|
706
|
-
];
|
|
707
|
-
|
|
708
|
-
function runTests(iouThreshold: number = 0.01, closeThreshold: number = 160) {
|
|
709
|
-
testCases.forEach((testCase) => {
|
|
710
|
-
console.log(`\nRunning test case: ${testCase.name}`);
|
|
711
|
-
console.log('Original Detections:', testCase.detections.length);
|
|
712
|
-
|
|
713
|
-
const startTime = performance.now();
|
|
714
|
-
const mergedDetections = mergeDetections(testCase.detections, iouThreshold, closeThreshold);
|
|
715
|
-
const endTime = performance.now();
|
|
716
|
-
|
|
717
|
-
console.log('Merged Detections:', mergedDetections.length);
|
|
718
|
-
console.log('Execution time:', (endTime - startTime).toFixed(3), 'ms');
|
|
719
|
-
|
|
720
|
-
// Basic validation
|
|
721
|
-
if (mergedDetections.length <= testCase.detections.length) {
|
|
722
|
-
console.log('✅ Test passed: Number of merged detections is not greater than original');
|
|
723
|
-
} else {
|
|
724
|
-
console.log('❌ Test failed: Number of merged detections is greater than original');
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
// Check if bounding boxes are valid
|
|
728
|
-
const invalidBoxes = mergedDetections.filter((d) => d.boundingBox[0] > d.boundingBox[2] || d.boundingBox[1] > d.boundingBox[3]);
|
|
729
|
-
if (invalidBoxes.length === 0) {
|
|
730
|
-
console.log('✅ Test passed: All merged bounding boxes are valid');
|
|
731
|
-
} else {
|
|
732
|
-
console.log('❌ Test failed: Some merged bounding boxes are invalid');
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
// Calculate average bounding box size change
|
|
736
|
-
const originalAvgSize = calculateAvgBoxSize(testCase.detections);
|
|
737
|
-
const mergedAvgSize = calculateAvgBoxSize(mergedDetections);
|
|
738
|
-
const sizeChangePercent = (((mergedAvgSize - originalAvgSize) / originalAvgSize) * 100).toFixed(2);
|
|
739
|
-
console.log(`Average bounding box size change: ${sizeChangePercent}%`);
|
|
740
|
-
|
|
741
|
-
// Print bounding boxes for visual inspection
|
|
742
|
-
console.log('Merged Bounding Boxes:');
|
|
743
|
-
mergedDetections.forEach((d, i) => {
|
|
744
|
-
console.log(` ${d.label}: Box ${i + 1}: [${d.boundingBox.join(', ')}]`);
|
|
745
|
-
});
|
|
746
|
-
|
|
747
|
-
// console.log('SVG:', visualizeBoundingBoxes(mergedDetections));
|
|
748
|
-
|
|
749
|
-
console.log('\n' + '='.repeat(50));
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
function calculateAvgBoxSize(detections: Detection[]): number {
|
|
754
|
-
const totalSize = detections.reduce((sum, d) => {
|
|
755
|
-
const [x1, y1, x2, y2] = d.boundingBox;
|
|
756
|
-
return sum + (x2 - x1) * (y2 - y1);
|
|
757
|
-
}, 0);
|
|
758
|
-
return totalSize / detections.length;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
runTests();
|