Comments (10)
Just remove broken codes.
basenet/vgg16_bn.py
from torchvision import models
[-] from torchvision.models.vgg import model_urls < Remove Ln. 7
...
class vgg16_bn(torch.nn.Module):
def __init__(self, pretrained=True, freeze=True):
super(vgg16_bn, self).__init__()
[-] model_urls['vgg16_bn'] = model_urls['vgg16_bn'].replace('https://', 'http://') < Remove Ln. 25
from craft-pytorch.
comment the "from torchvision.models.vgg import model_urls"
It worked here!
Insert all this:
all = [
'VGG', 'vgg11', 'vgg11_bn', 'vgg13', 'vgg13_bn', 'vgg16', 'vgg16_bn',
'vgg19_bn', 'vgg19',
]
model_urls = {
'vgg11': 'https://download.pytorch.org/models/vgg11-bbd30ac9.pth',
'vgg13': 'https://download.pytorch.org/models/vgg13-c768596a.pth',
'vgg16': 'https://download.pytorch.org/models/vgg16-397923af.pth',
'vgg19': 'https://download.pytorch.org/models/vgg19-dcbb9e9d.pth',
'vgg11_bn': 'https://download.pytorch.org/models/vgg11_bn-6002323d.pth',
'vgg13_bn': 'https://download.pytorch.org/models/vgg13_bn-abd245e5.pth',
'vgg16_bn': 'https://download.pytorch.org/models/vgg16_bn-6c64b313.pth',
'vgg19_bn': 'https://download.pytorch.org/models/vgg19_bn-c79401a0.pth',
}
Or insert this for Resnet:
all = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152']
model_urls = {
'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth',
'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth',
'resnet50': 'https://download.pytorch.org/models/resnet50-19c8e357.pth',
'resnet101': 'https://download.pytorch.org/models/resnet101-5d3b4d8f.pth',
'resnet152': 'https://download.pytorch.org/models/resnet152-b121ed2d.pth',
}
from craft-pytorch.
Downgrading to torchvision==0.13 worked for me
from craft-pytorch.
Downgrading to torchvision==0.13 worked for me
does not work bro
from craft-pytorch.
+1
from craft-pytorch.
comment the "from torchvision.models.vgg import model_urls" It worked here!
Insert all this:
all = [ 'VGG', 'vgg11', 'vgg11_bn', 'vgg13', 'vgg13_bn', 'vgg16', 'vgg16_bn', 'vgg19_bn', 'vgg19', ]
model_urls = { 'vgg11': 'https://download.pytorch.org/models/vgg11-bbd30ac9.pth', 'vgg13': 'https://download.pytorch.org/models/vgg13-c768596a.pth', 'vgg16': 'https://download.pytorch.org/models/vgg16-397923af.pth', 'vgg19': 'https://download.pytorch.org/models/vgg19-dcbb9e9d.pth', 'vgg11_bn': 'https://download.pytorch.org/models/vgg11_bn-6002323d.pth', 'vgg13_bn': 'https://download.pytorch.org/models/vgg13_bn-abd245e5.pth', 'vgg16_bn': 'https://download.pytorch.org/models/vgg16_bn-6c64b313.pth', 'vgg19_bn': 'https://download.pytorch.org/models/vgg19_bn-c79401a0.pth', }
Or insert this for Resnet:
all = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152']
model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://download.pytorch.org/models/resnet50-19c8e357.pth', 'resnet101': 'https://download.pytorch.org/models/resnet101-5d3b4d8f.pth', 'resnet152': 'https://download.pytorch.org/models/resnet152-b121ed2d.pth', }
This worked for me. I had problem in the easyocr library that was using the vgg models. Made the changes that you mentioned in their modules.py and it worked. Thank you very much.
from craft-pytorch.
For current version of torchvision (0.16.2
) the import should be:
from torchvision.models.vgg import VGG16_BN_Weights
but the code is not used anyway, so best to just remove it like mentioned:
Just remove broken codes.
basenet/vgg16_bn.py
from torchvision import models [-] from torchvision.models.vgg import model_urls < Remove Ln. 7 ... class vgg16_bn(torch.nn.Module): def __init__(self, pretrained=True, freeze=True): super(vgg16_bn, self).__init__() [-] model_urls['vgg16_bn'] = model_urls['vgg16_bn'].replace('https://', 'http://') < Remove Ln. 25
Also, check this SO post.
from craft-pytorch.
I am facing the same issue. Is there a chance we can commit the fix in this repo?
It'd make the life easier.
from craft-pytorch.
I think there is a PR currently open:
#202
But tbh, I don't understand why bbox.py
is also modified
from craft-pytorch.
If you have proxy config didn't work :c
from craft-pytorch.
Related Issues (20)
- The use of args canvas_size and mag_ratio ?
- Cropped image with merge bounding boxes
- OSError: image file is truncated (0 bytes not processed) HOT 1
- What is `score_text` in line 162 of `test.py` ?
- input image size HOT 1
- How to fine tune the craft model? HOT 1
- Code for training HOT 2
- how to get the recognized text ? HOT 2
- I tried implementing this as a base to build my custom API for ocr and my bboxes are not sorted they come up in random order what can i do about this?
- ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5,) + inhomogeneous part. HOT 3
- Can I extract the text color? HOT 1
- Are the requirements in requirements.txt outdated/deprecated, no longer available? HOT 1
- Downgrading to torchvision==0.13 worked for me
- ERROR: Could not find a version that satisfies the requirement torch==0.4.1 HOT 2
- Unable to Download craftnet weights HOT 2
- Weights are None
- weights enum or none
- craft for japanese
- Really big images HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craft-pytorch.