mirror of
https://github.com/azaion/detections.git
synced 2026-06-21 10:21:08 +00:00
Added camera config
This commit is contained in:
@@ -41,9 +41,13 @@ def user_ai_settings(user_id):
|
||||
"tracking_intersection_threshold": 0.6,
|
||||
"model_batch_size": 8,
|
||||
"big_image_tile_overlap_percent": 20,
|
||||
"altitude": 400,
|
||||
"focal_length": 24,
|
||||
"sensor_width": 23.5,
|
||||
"camera_config": {
|
||||
"focal_length": 24,
|
||||
"sensor_width": 23.5,
|
||||
"current_zoom": 1,
|
||||
"current_angle": 90,
|
||||
"current_height": 400,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,17 @@ def test_nft_perf_03_tiling_overhead_large_image(
|
||||
_, small_ms = image_detect(image_small, "small.jpg", timeout=20)
|
||||
_, large_ms = image_detect(
|
||||
image_large, "large.jpg",
|
||||
config=json.dumps({"altitude": 400, "focal_length": 24, "sensor_width": 23.5}),
|
||||
config=json.dumps(
|
||||
{
|
||||
"camera_config": {
|
||||
"focal_length": 24,
|
||||
"sensor_width": 23.5,
|
||||
"current_zoom": 1,
|
||||
"current_angle": 90,
|
||||
"current_height": 400,
|
||||
}
|
||||
}
|
||||
),
|
||||
timeout=20,
|
||||
)
|
||||
assert large_ms < 30_000.0
|
||||
|
||||
@@ -149,9 +149,13 @@ def test_ft_p_07_physical_size_filtering_ac4(image_detect, image_small, warm_eng
|
||||
gsd = (sensor_width * altitude) / (focal_length * image_width_px)
|
||||
cfg = json.dumps(
|
||||
{
|
||||
"altitude": altitude,
|
||||
"focal_length": focal_length,
|
||||
"sensor_width": sensor_width,
|
||||
"camera_config": {
|
||||
"focal_length": focal_length,
|
||||
"sensor_width": sensor_width,
|
||||
"current_zoom": 1,
|
||||
"current_angle": 90,
|
||||
"current_height": altitude,
|
||||
},
|
||||
}
|
||||
)
|
||||
body, _ = image_detect(image_small, "img.jpg", config=cfg, timeout=_DETECT_SLOW_TIMEOUT)
|
||||
|
||||
@@ -3,7 +3,15 @@ import json
|
||||
import pytest
|
||||
|
||||
_TILING_TIMEOUT = 120
|
||||
_GSD = {"altitude": 400, "focal_length": 24, "sensor_width": 23.5}
|
||||
_GSD = {
|
||||
"camera_config": {
|
||||
"focal_length": 24,
|
||||
"sensor_width": 23.5,
|
||||
"current_zoom": 1,
|
||||
"current_angle": 90,
|
||||
"current_height": 400,
|
||||
}
|
||||
}
|
||||
_DUP_THRESHOLD = 0.01
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user