2024-04-20 13:52:25 +08:00
|
|
|
import os
|
2024-04-21 00:02:47 +08:00
|
|
|
import torch
|
|
|
|
|
2024-04-20 13:52:25 +08:00
|
|
|
|
|
|
|
class ServerConfig(object):
|
|
|
|
# 视频文件配置
|
2024-04-21 00:02:47 +08:00
|
|
|
videos_root_path : str = os.path.join('data', 'videos')
|
|
|
|
videos_play_path : str = os.path.join(videos_root_path, 'play')
|
|
|
|
videos_upload_path : str = os.path.join(videos_root_path, 'upload')
|
|
|
|
videos_chunk_size : int = 1024 * 1024 * 1024
|
|
|
|
# 数据文件配置
|
2024-04-21 15:41:27 +08:00
|
|
|
h5s_root_path : str = os.path.join('data', 'h5s')
|
|
|
|
# 权重文件配置
|
|
|
|
weights_root_path : str = os.path.join('data', 'weights')
|
|
|
|
weights_dsnet_af : str = os.path.join(weights_root_path, 'dsnet_af.pth')
|
2024-04-20 13:52:25 +08:00
|
|
|
# TODO
|
|
|
|
|
2024-04-21 00:02:47 +08:00
|
|
|
|
|
|
|
class DSNetConfig(object):
|
|
|
|
device : str = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
|
|
random_seed : int = 4906
|
|
|
|
sample_rate : int = 15
|
|
|
|
nms_thresh : float = 0.5
|
|
|
|
lambda_center : float = 1.
|
2024-04-20 13:52:25 +08:00
|
|
|
# TODO
|
|
|
|
pass
|
|
|
|
|