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

Please explain how to run dehaze #24

Open
russell-taylor opened this issue Dec 10, 2019 · 4 comments
Open

Please explain how to run dehaze #24

russell-taylor opened this issue Dec 10, 2019 · 4 comments

Comments

@russell-taylor
Copy link

I am trying to run dehaze on an image but whether I run only dehaze or try to run all three with or without piping from dehaze I get the error: Exception occurred in analyze.py: Object arrays cannot be loaded when allow_pickle=False

There do not seem to be instructions in the PDF User Manual that came with the program for running dehaze. Please provide instructions for running this algorithm.

Thanks!
Russ

@russell-taylor
Copy link
Author

It looks like the problem was that I was using numpy version 1.17.1 rather than version 1.16.1. When I did 'pip uninstall numpy' and then 'pip install numpy==1.16.1' and re-ran with the dehaze piped into the next algorithm, the program finished. Maybe modify the Python loader code and instructions to be explicit about the version to be loaded?

@polofgrs
Copy link

I personally managed to run the dehaze algorithm on the latest version of Numpy by modifying the AODNet.py file, setting the allow_pickle argument to True (line 95) :

# Loading model weights
np_weights = np.load(model_path, allow_pickle=True).item()

@russell-taylor
Copy link
Author

The fix by @polofgrs seems more general than trying to pull in an older version of numpy.

@russell-taylor
Copy link
Author

Added this in a pull request and verified that it also fixed the issue for me with numpy 1.17.4. This issue can be closed when it is merged.

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