modify dotrack module

This commit is contained in:
王庆刚
2024-06-03 15:25:39 +08:00
parent d1ea304491
commit f90ef72cbf
19 changed files with 502 additions and 420 deletions

View File

@ -15,8 +15,11 @@ class Config:
embedding_size = 256
img_size = 224
ckpt_path = r"ckpts\resnet18_1220\best.pth"
ckpt_path = r"ckpts\best_resnet18_1887_0311.pth"
current_path = os.path.dirname(os.path.abspath(__file__))
model_path = os.path.join(current_path, r"ckpts\resnet18_1220\best.pth")
model_path = os.path.join(current_path, ckpt_path)
# model_path = "./trackers/reid/ckpts/resnet18_1220/best.pth"
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

View File

@ -46,6 +46,8 @@ class ReIDInterface:
self.model = nn.DataParallel(model).to(self.device)
self.model = model
self.model.load_state_dict(torch.load(self.model_path, map_location=self.device))
self.model.eval()