Getting the heat map out of VILT (Figure 4 in the paper)
### Feature request

I would like to get the heatmap from ViLT (Visualizations of transportation plan of word patch alignment). 

### Motivation

It is useful for debug and also might be useful for other applications. It is shown in Figure 4 in the paper: https://arxiv.org/pdf/2102.03334.pdf

### Your contribution

NA
Hi,

Yes it's totally possible to re-create that. Basically it comes down to translating [this script](https://github.com/dandelin/ViLT/blob/master/demo.py) to a Gradio demo.

I'm marking this as "good first issue" as it seems fairly straightforward.<|||||>Hi, I would like to work on it<|||||>@NielsRogge Is this issue still open ? I would to like to work on this. Can you assign this issue to me ?
<|||||>@NielsRogge , is this issue still open I would like to contribute to this <|||||>Yeah, I guess. I think you guys can go ahead and open PR.<|||||>> @NielsRogge , is this issue still open I would like to contribute to this

Hey Rajath ! Would love to work on this issue with you. Do you mind working with me on this? Kinda new to open source contribution. 
<|||||>Is anyone still working on this? I can help<|||||>@NielsRogge is this supposed to be implemented as a method on all vilts or a function that takes a vilt model as input and launches the gradio demo? <|||||>You can just implement a Gradio demo and host it on https://huggingface.co/spaces.<|||||>> You can just implement a Gradio demo and host it on https://huggingface.co/spaces.

I've made one https://huggingface.co/spaces/MikailDuzenli/vilt_demo , I just implemented the demo of the model itself for the moment but I'm trying to add the heatmap (help is welcome).<|||||>> > You can just implement a Gradio demo and host it on https://huggingface.co/spaces.
> 
> I've made one https://huggingface.co/spaces/MikailDuzenli/vilt_demo , I just implemented the demo of the model itself for the moment but I'm trying to add the heatmap (help is welcome).

I could help<|||||>Very cool demo @MikailINTech! Awesome work. Final step is indeed visualizing the heatmap<|||||>> Very cool demo @MikailINTech! Awesome work. Final step is indeed visualizing the heatmap

Thank you ! Just finished adding the heatmap. Is there a way I can have this issue mark as resolved ?<|||||>Really cool! Although I'd also include the entire image in the result (not just the heat map), to compare.

Then I'll close this issue!<|||||>Thanks @NielsRogge for the suggestion, now one can see the image and the heatmap. I hope that it's what @Ngheissari was looking for <|||||>Awesome! Closing this issue.

I tweeted about it here :) https://twitter.com/NielsRogge/status/1580246704011370496