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

Simplified Inference #1045

Closed
wants to merge 39 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2be4a8c
initial commit
glenn-jocher Sep 25, 2020
c9ef269
batch inference update
glenn-jocher Sep 27, 2020
c599075
initial commit
glenn-jocher Sep 25, 2020
68c78a0
batch inference update
glenn-jocher Sep 27, 2020
c8141ba
Merge remote-tracking branch 'origin/simple_inference' into simple_in…
glenn-jocher Oct 10, 2020
623c568
add torch capability
glenn-jocher Oct 10, 2020
097aca2
empty image bug fix
glenn-jocher Oct 10, 2020
9896ce0
comment update
glenn-jocher Oct 10, 2020
11ea358
extract NMS to allow for augment
glenn-jocher Oct 10, 2020
82e865a
update NMS thresholds to CoreML defaults
glenn-jocher Oct 10, 2020
c2403d7
fuse() bug fix
glenn-jocher Oct 10, 2020
d87cf7e
Update requirements.txt coremltools==4.0
glenn-jocher Oct 11, 2020
d45e349
Rearrange export input after checks (#1118)
glenn-jocher Oct 11, 2020
10c85bf
FROM nvcr.io/nvidia/pytorch:20.09-py3
glenn-jocher Oct 11, 2020
0ada058
Generalized regression criterion renaming (#1120)
glenn-jocher Oct 11, 2020
00917a6
update expt name comment and folder parsing for training (#978)
Borda Oct 13, 2020
4346b13
Dataset download bash script updates (#1132)
glenn-jocher Oct 13, 2020
4d3680c
Minor import and spelling updates (#1133)
glenn-jocher Oct 13, 2020
c67e722
fix compatibility for hyper config (#1146)
Borda Oct 15, 2020
fe1d90a
fuse() bug fix
glenn-jocher Oct 10, 2020
70432a5
Update requirements.txt coremltools==4.0
glenn-jocher Oct 11, 2020
e63bf4d
Rearrange export input after checks (#1118)
glenn-jocher Oct 11, 2020
bfa2f89
FROM nvcr.io/nvidia/pytorch:20.09-py3
glenn-jocher Oct 11, 2020
402095a
Generalized regression criterion renaming (#1120)
glenn-jocher Oct 11, 2020
7363872
update expt name comment and folder parsing for training (#978)
Borda Oct 13, 2020
6088171
Dataset download bash script updates (#1132)
glenn-jocher Oct 13, 2020
330bdfb
Minor import and spelling updates (#1133)
glenn-jocher Oct 13, 2020
d7e6f4d
fix compatibility for hyper config (#1146)
Borda Oct 15, 2020
34282b0
update copied attributes
glenn-jocher Oct 15, 2020
8668c2b
optimize imports
glenn-jocher Oct 15, 2020
91a029a
initial commit
glenn-jocher Sep 25, 2020
a34b35b
batch inference update
glenn-jocher Sep 27, 2020
a9db87b
initial commit
glenn-jocher Sep 25, 2020
37a07a2
comment update
glenn-jocher Oct 10, 2020
5159d10
extract NMS to allow for augment
glenn-jocher Oct 10, 2020
0be772e
update NMS thresholds to CoreML defaults
glenn-jocher Oct 10, 2020
8144436
update copied attributes
glenn-jocher Oct 15, 2020
dc53110
optimize imports
glenn-jocher Oct 15, 2020
efa5e3f
Merge remote-tracking branch 'origin/simple_inference' into simple_in…
glenn-jocher Oct 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
comment update
  • Loading branch information
glenn-jocher committed Oct 15, 2020
commit 37a07a255f363510689ad2d0d209695606e82915
3 changes: 1 addition & 2 deletions hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import torch

from models.common import NMS
from models.yolo import Model
from utils.google_utils import attempt_download

Expand All @@ -36,7 +35,7 @@ def create(name, pretrained, channels, classes):
state_dict = torch.load(ckpt, map_location=torch.device('cpu'))['model'].float().state_dict() # to FP32
state_dict = {k: v for k, v in state_dict.items() if model.state_dict()[k].shape == v.shape} # filter
model.load_state_dict(state_dict, strict=False) # load
# model = model.autoshape() # cv2/PIL/np inference: predictions = model(cv2.imread('img.jpg'))
# model = model.autoshape() # cv2/PIL/np/torch inference: predictions = model(Image.open('image.jpg'))
return model

except Exception as e:
Expand Down