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

Added a size adjuster since large images may take too long to process and it might not always be necessary to have the exact same resolution. Also slightly modified the preprocessing steps to make them work better #548

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion vision/object_detection_segmentation/fcn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import numpy as np is missing.

img_data = utils.preprocess(orig_tensor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's `utils? Or it refers to the preprocess function defined above?

img_data = img_data.unsqueeze(0)
img_data = img_data.detach().cpu().numpy()
```

### Output of model
Expand Down