Icevision: Pipeline for fast, single image prediction

Created on 17 Aug 2020  路  3Comments  路  Source: airctic/icevision

馃摀 New

Is this a request for a tutorial or for an example?
Example

What is the task?
How to do a fast prediction for single image

Let say we start with something like


from mantisshrimp.all import *
from PIL import Image

model = faster_rcnn.model(num_classes=5)

model.load_state_dict(torch.load(weights_path, map_location=lambda storage, loc: storage))
model.eval()

img = Image.open(path)

How to add Normalizing transformation and get a prediction without constructing the Parser and Dataset

Is this example for a specific model?
FasterRCNN


Don't remove
Main issue for examples: #39

documentation example request good first issue help wanted

Most helpful comment

Yeah the approach from the example works fine. However it might be useful to add Resize tfms to the transformations list

tfms = tfms.A.Adapter([tfms.A.Resize(384, 384), tfms.A.Normalize()]) So we are sure that the image domain is same

Thanks again for your help :)

All 3 comments

We have a snippet for that, still needs to be converted to a tutorial, check it out here

Yeah the approach from the example works fine. However it might be useful to add Resize tfms to the transformations list

tfms = tfms.A.Adapter([tfms.A.Resize(384, 384), tfms.A.Normalize()]) So we are sure that the image domain is same

Thanks again for your help :)

@tugot17 can this be closed?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

partham16 picture partham16  路  3Comments

lgvaz picture lgvaz  路  4Comments

bguan picture bguan  路  6Comments

lgvaz picture lgvaz  路  6Comments

adamfarquhar picture adamfarquhar  路  4Comments