Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #459

Open
WenBingo opened this issue Sep 4, 2023 · 0 comments
Open

test #459

WenBingo opened this issue Sep 4, 2023 · 0 comments

Comments

@WenBingo
Copy link

WenBingo commented Sep 4, 2023

The pre-training file is tested after loading, but the result is completely wrong. I writer test.py base on predict.py

net = UNet(n_channels=3, n_classes=args.classes, bilinear=args.bilinear)
state_dict = torch.load('./unet_carvana_scale0.5_epoch2.pth', map_location=device)
mask_values = state_dict.pop('mask_values', [0, 1])
net.load_state_dict(state_dict)

mask = predict_img(net=net,
full_img=image,
scale_factor=args.scale,
out_threshold=args.mask_threshold,
device=device)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant