Skip to content
Snippets Groups Projects
Commit 6aeaeb79 authored by Jeppe Gade's avatar Jeppe Gade
Browse files

Warning no more

parent a6656f63
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,8 @@ import numpy as np
from coco_utils import get_image
import warnings
warnings.filterwarnings("ignore", category=UserWarning)
model = torch.hub.load('pytorch/vision:v0.10.0', 'mobilenet_v2', pretrained=True)
#Enable following to only get CNN part:
......@@ -26,7 +28,7 @@ preprocess = transforms.Compose([
#Outputs mini-batch that can be input to model
def preprocessImage(image):
input_tensor = preprocess(input_image)
input_tensor = preprocess(image)
return input_tensor.unsqueeze(0) # create a mini-batch as expected by the model
#Runs the CNN on input
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment