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

Generation of attention maps problem #48

Open
Valquoniam opened this issue Jul 19, 2023 · 0 comments
Open

Generation of attention maps problem #48

Valquoniam opened this issue Jul 19, 2023 · 0 comments

Comments

@Valquoniam
Copy link

Hey, I've been trying to generate attention maps, but I've been stuck with some errors.

Here is the way I used your codebase after cloning it :

  • Download cityscapes dataset : 'python prepare_data.py --cityscapes --max-images 100000'
  • Download pre-trained network for this dataset (and generating some images at the same time) : 'python generate.py --gpus 0 --model gdrive:cityscapes-snapshot.pkl --output-dir images --images-num 32'

Then I wanted to generate some attention maps : 'python run_network.py --gpus 0 --vis --pretrained-pkl cityscapes-snapshot.pkl --dataset cityscapes --vis-layer-maps'

At first, the code executed correctly, but no file was saved, there was only an empty 'layer_maps' folder.
When forcing the parameter 'attention' to be True (visualise.py, l.72), I got this error :

visualize.py", line 170, in vis
pallete = np.expand_dims(misc.get_colors(k - 1), axis = [2, 3])
numpy.AxisError: axis 3 is out of bounds for array of dimension 3

I don't know if I'm not using the codebase correctly or not, as a beginner.

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

1 participant