We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Having a spot of trouble with prepare_guide, as described in your example code.
prepare_guide
Traceback (most recent call last): File "./guided-test.py", line 30, in <module> features = bc.prepare_guide(Image.open(guide_image), end=layer) File "/usr/local/lib/python2.7/dist-packages/batcountry/batcountry.py", line 185, in prepare_guide src.reshape(1, 3, nH, nW) UnboundLocalError: local variable 'nH' referenced before assignment
Here are the pertinent bits of my script.
bc = BatCountry("/home/username/caffe/models/bvlc_googlenet") input_image = "/home/username/images/monkey.jpg" output_image = "/home/username/test-guided.jpg" guide_image = "/home/username/guides/starry-guide.jpg" layer = "inception_4c/output" features = bc.prepare_guide(Image.open(guide_image), end=layer) image = bc.dream(np.float32( Image.open(input_image)), end=layer, iter_n=20, objective_fn=BatCountry.guided_objective, objective_features=features, ) result = Image.fromarray(np.uint8(image)) result.save(output_image) input_image = output_image
Thanks!
The text was updated successfully, but these errors were encountered:
I think I see the problem. I installed from pip, and apparently your resize changes have not been pushed.
# whoops! not declared in version on pypi! src.reshape(1, 3, nH, nW)
Sorry, something went wrong.
pip install git+https://github.com/jrosebr1/bat-country.git did the trick.
pip install git+https://github.com/jrosebr1/bat-country.git
Thanks for bringing this to my attention @kphretiq. I'll need to create a newly updated version and push it to PyPI.
No branches or pull requests
Having a spot of trouble with
prepare_guide
, as described in your example code.Here are the pertinent bits of my script.
Thanks!
The text was updated successfully, but these errors were encountered: