Skip to content

Commit

Permalink
update db_resnet50 and onnx model url for detection model
Browse files Browse the repository at this point in the history
  • Loading branch information
smg478 committed Mar 20, 2024
1 parent 9576d4e commit 46fd2c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doctr/models/detection/differentiable_binarization/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
"input_shape": (3, 1024, 1024),
"mean": (0.798, 0.785, 0.772),
"std": (0.264, 0.2749, 0.287),
"url": "https://doctr-static.mindee.com/models?id=v0.3.1/db_resnet50-ac60cadc.pt&src=0",
# "url": "https://doctr-static.mindee.com/models?id=v0.3.1/db_resnet50-ac60cadc.pt&src=0",
"url": "https://doctr-static.mindee.com/models?id=v0.7.0/db_resnet50-79bd7d70.pt&src=0", # New URL for v0.7.0
},
'db_resnet50_onnx': {
'input_shape': (3, 1024, 1024),
'mean': (0.798, 0.785, 0.772),
'std': (0.264, 0.2749, 0.287),
'url': 'https://github.com/h2oai/doctr/releases/download/onnx_models/db_resnet50.onnx',
'url': 'https://github.com/h2oai/doctr/releases/download/onnx_model_0.8/db_resnet50.onnx'
},
'db_resnet34': {
'input_shape': (3, 1024, 1024),
Expand Down Expand Up @@ -300,6 +301,8 @@ def _dbnet(
# Load pretrained parameters
if pretrained:
load_pretrained_params(model, default_cfgs[arch]["url"])
print(f"Loaded pretrained parameters for {arch}")
print(f"Pretrained parameters loaded from {default_cfgs[arch]['url']}")

return model

Expand Down

0 comments on commit 46fd2c0

Please sign in to comment.