From c428de4f1a72b9b729a25e6fb959c021996e3fe1 Mon Sep 17 00:00:00 2001 From: Aditya Dandwate <96363931+AD-lite24@users.noreply.github.com> Date: Mon, 22 Aug 2022 16:41:57 +0530 Subject: [PATCH] Update README.md --- vision/object_detection_segmentation/fcn/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vision/object_detection_segmentation/fcn/README.md b/vision/object_detection_segmentation/fcn/README.md index caa332ae7..1f69ac293 100644 --- a/vision/object_detection_segmentation/fcn/README.md +++ b/vision/object_detection_segmentation/fcn/README.md @@ -44,7 +44,13 @@ preprocess = transforms.Compose([ ]) img = Image.open('dependencies/000000017968.jpg') -img_data = preprocess(img).detach().cpu().numpy() + +#Uncomment the following line to resize to the approriate resolution +#img = img.resize((640 ,480), Image.Resampling.LANCZOS) +orig_tensor = np.array(img) +img_data = utils.preprocess(orig_tensor) +img_data = img_data.unsqueeze(0) +img_data = img_data.detach().cpu().numpy() ``` ### Output of model