config.yml
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Design Image Search Service Configuration
# Design 图像搜索服务配置文件
# Server Settings
server:
host: "0.0.0.0"
port: 5088
workers: 1
# Database Settings
database:
sqlite:
path: "./data/design_images_v2.db"
mysql:
host: "${MYSQL_HOST:localhost}"
port: "${MYSQL_PORT:3306}"
database: "${MYSQL_DB:saas_design}"
username: "${MYSQL_USER:root}"
password: "${MYSQL_PASSWORD}"
charset: "utf8mb4"
# Feature Extraction
feature_extractor:
orb:
max_features: 1200 # ORB keypoints
cnn:
model: "mobilenet_v3_small"
input_size: [224, 224]
vector_dim: 1152
# Search Engine
search:
max_candidates: 200
max_concurrent: 2
ransac_top_k: 200 # RANSAC fine ranking
fusion_weights:
cnn: 0.2 # 20%
ransac: 0.8 # 80%
ransac:
min_inliers: 15
reproj_threshold: 4.0
confidence: 0.995
threads: 4
# Data Sync
sync:
eps_ids: [2]
overlap_seconds: 120
reconcile_hour: 18 # Container clock is UTC: 18:00 UTC = 02:00 Beijing time next day.
interval_seconds: 60 # Sync every minute
batch_size: 500 # Process 500 records per batch
image_download_timeout: 30 # seconds
image_cache_dir: "./data/design_images"
# JWT Settings
jwt:
secret: "${JWT_SECRET}"
algorithm: "HS256"
subject: "saas-item-service"
expires_hours: 1
# File Upload
upload:
max_file_size: 10485760 # 10MB in bytes
allowed_formats: ["jpg", "jpeg", "png"]
temp_dir: "./data/uploads"
# Logging
logging:
level: "INFO"
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
file: "./logs/app.log"
max_bytes: 10485760 # 10MB
backup_count: 5
# CORS (if needed)
cors:
enabled: true
origins:
- "*" # Configure for production
methods:
- "POST"
- "GET"
headers:
- "*"