22 lines
556 B
Python
22 lines
556 B
Python
import torch
|
|
import torchvision.transforms as T
|
|
|
|
class Config:
|
|
host = "192.168.1.28"
|
|
port = "19530"
|
|
|
|
embedding_size = 256
|
|
img_size = 224
|
|
test_transform = T.Compose([
|
|
T.ToTensor(),
|
|
T.Resize((img_size, img_size)),
|
|
T.ConvertImageDtype(torch.float32),
|
|
T.Normalize(mean=[0.5], std=[0.5]),
|
|
])
|
|
|
|
# test_model = "checkpoints/resnet18_our388.pth"
|
|
test_model = "checkpoints/mobilenetv3Large_our388_noPara.pth"
|
|
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
config = Config()
|