update
This commit is contained in:
93
tools/config.py
Normal file
93
tools/config.py
Normal file
@ -0,0 +1,93 @@
|
||||
|
||||
# from yacs.config import CfgNode as CfgNode
|
||||
import torchvision.transforms as T
|
||||
import torch
|
||||
import os
|
||||
|
||||
class globalVal:
|
||||
tempLibList = []
|
||||
tempLibLists = {}
|
||||
track_y_lists = []
|
||||
mac_id = None
|
||||
back_return_similarity = []
|
||||
back_add_similarity = []
|
||||
front_return_similarity = []
|
||||
front_add_similarity = []
|
||||
comprehensive_similarity = []
|
||||
|
||||
class config:
|
||||
save_videos_dir = 'videos'
|
||||
|
||||
#url
|
||||
# push_url = 'http://api.test2.ieemoo.cn/emoo-api/intelligence/addVideoPathBySequenceId.do'
|
||||
push_url = 'https://api.test2.ieemoo.cn/emoo-api/intelligence/addVideoPathBySequenceId.do' # 闲时上传
|
||||
get_config_url = 'https://api.test2.ieemoo.cn/emoo-api/intelligence/addVideoPathByStoreId.do' # 闲时上传相应配置
|
||||
storidPth = 'tools/storeId.txt'
|
||||
|
||||
#obs update
|
||||
obs_access_key_id = 'LHXJC7GIC2NNUUHHTNVI'
|
||||
obs_secret_access_key = 'sVWvEItrFKWPp5DxeMvX8jLFU69iXPpzkjuMX3iM'
|
||||
obs_server = 'https://obs.cn-east-3.myhuaweicloud.com'
|
||||
obs_bucketName = 'ieemoo-ai'
|
||||
|
||||
keys = ['x', 'y', 'w', 'h', 'track_id', 'score', 'cls', 'frame_index']
|
||||
|
||||
obs_root_dir = 'ieemoo_ai_data'
|
||||
|
||||
#contrast config
|
||||
host = "192.168.1.28"
|
||||
port = "19530"
|
||||
embedding_size = 256
|
||||
img_size = 224
|
||||
test_transform = T.Compose([
|
||||
T.ToTensor(),
|
||||
T.Resize((224, 224)),
|
||||
T.ConvertImageDtype(torch.float32),
|
||||
T.Normalize(mean=[0.5], std=[0.5]),
|
||||
])
|
||||
|
||||
# test_model = "./tools/ckpts/MobilenetV3Large_noParallel_2624.pth"
|
||||
test_model = "./tools/ckpts/resnet18_0721_best.pth"
|
||||
tracking_model = "./tools/ckpts/best_158734_cls11_noaug10.pt"
|
||||
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
||||
|
||||
httpHost = '0.0.0.0'
|
||||
httpPort = 8088
|
||||
|
||||
#tracking config
|
||||
botsort = './ytracking/tracking/trackers/cfg/botsort.yaml'
|
||||
incart = './tools/Template_images/incart.png'
|
||||
outcart = './tools/Template_images/outcart.png'
|
||||
cartboarder = './tools/Template_images/cartboarder.png'
|
||||
edgeline = './tools/Template_images/edgeline.png'
|
||||
cartedge = './tools/Template_images/cartedge.png'
|
||||
incart_ftmp = './tools/Template_images/incart_ftmp.png'
|
||||
|
||||
|
||||
action_type = {
|
||||
"1": 'purchase',
|
||||
'2': 'jettison',
|
||||
'3': 'unswept_purchase',
|
||||
'4': 'unswept_jettison'
|
||||
}
|
||||
camera_id = {
|
||||
'0': 'back',
|
||||
'1': 'front',
|
||||
}
|
||||
recognize_result = {
|
||||
'01': 'uncatalogued',
|
||||
'02': 'fail',
|
||||
'03': 'exception',
|
||||
'04': 'pass',
|
||||
}
|
||||
|
||||
# reid config
|
||||
backbone = 'resnet18' # [resnet18, mobilevit_s, mobilenet_v2, mobilenetv3]
|
||||
batch_size = 8
|
||||
|
||||
model_path = './tools/ckpts/best_resnet18_0515.pth'
|
||||
|
||||
temp_video_name = None
|
||||
|
||||
cfg = config()
|
||||
gvalue = globalVal()
|
Reference in New Issue
Block a user