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

RuntimeError or AttributeError #19

Open
IsabellaVel opened this issue Apr 9, 2021 · 1 comment
Open

RuntimeError or AttributeError #19

IsabellaVel opened this issue Apr 9, 2021 · 1 comment

Comments

@IsabellaVel
Copy link

IsabellaVel commented Apr 9, 2021

Actually, I managed to install Caffe and autocolorize and then, I try to get it working with an image.
I use GitBash, Windows 10, conda.

  1. When I run in GitBash autocolorize grayscale.png -o colorized.png I get the following error:
File "C:/Users/xxx/anaconda3/envs/caffe/Scripts/autocolorize", line 11, in <module>
    main()
  File "C:\Users\xxx\anaconda3\envs\caffe\lib\site-packages\autocolorize\__main__.py", line 57, in main
    weights=args.weights)
  File "C:\Users\xxx\anaconda3\envs\caffe\lib\site-packages\autocolorize\extraction.py", line 66, in load_default_classifier
    classifier = load_classifier(f.name, weights=weights_fn)
  File "C:\Users\xxx\anaconda3\envs\caffe\lib\site-packages\autocolorize\extraction.py", line 44, in load_classifier
    classifier = caffe.Classifier(bare_fn, fn)
  File "C:\Users\xxx\anaconda3\envs\caffe\lib\site-packages\caffe\classifier.py", line 26, in __init__
    caffe.Net.__init__(self, model_file, caffe.TEST, weights=pretrained_file)
RuntimeError: Could not open file C:\Users\xxx\AppData\Local\Temp\tmp1ndjgn6lprototxt
(caffe)
  1. When I run via a Python script, then I get this error:
Loading C:\Users\xxx/.autocolorize\autocolorize.caffemodel.h5
Traceback (most recent call last):
  File "colorize.py", line 3, in <module>
    classifier = autocolorize.load_default_classifier()
  File "C:\Users\xxx\anaconda3\lib\site-packages\autocolorize\extraction.py",
line 66, in load_default_classifier
    classifier = load_classifier(f.name, weights=weights_fn)
  File "C:\Users\xxx\anaconda3\lib\site-packages\autocolorize\extraction.py",
line 44, in load_classifier
    classifier = caffe.Classifier(bare_fn, fn)
AttributeError: module 'caffe' has no attribute 'Classifier'

Could you help in here?

@ChiaraBi
Copy link

ChiaraBi commented Sep 2, 2021

I'm having the same issue. It seems there is a problem with caffe: it doesn't find the module caffe._caffe, but I am not understanding why. Any help would be highly appreciated! Thanks in advance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants