farrell236 / RATCHET

RAdiological Text Captioning for Human Examined Thoraxes
MIT License
39 stars 9 forks source link

Running web_demo #1

Closed Minashraf closed 2 years ago

Minashraf commented 2 years ago

I get a

"No Pretrained Densenet-121 weights specified" image

farrell236 commented 2 years ago

When the Transformer is first being created, it instantiates the Encoder class which creates a DenseNet from Keras applications. If you have pre-trained weights at hand, that's where it's being loaded.

The entire Transformer model checkpoint contains weights for the DenseNet encoder, so that (debug) message can be safely ignored.

Minashraf commented 2 years ago

I added both v1 and v2 pretrained weight so I should be safe right?

farrell236 commented 2 years ago
Minashraf commented 2 years ago

So should I put both in the checkpoints folder or is only v2 enough?

farrell236 commented 2 years ago

Just one version of the checkpoint per folder, you then specify the folder location here and here.

Minashraf commented 2 years ago

I unzipped both and the folder structure looks as follows leaving the code as it is, so is it right? image

farrell236 commented 2 years ago

it should be like this:

bh1511@armada:~/streamlit/RATCHET$ tree checkpoints/
checkpoints/
├── cxr_validator_model.h5
├── ratchet_model_weights_202009251103.zip
└── train0
    ├── checkpoint
    ├── ckpt-12.data-00000-of-00001
    └── ckpt-12.index

1 directory, 5 files

We have a hosted live demo of RATCHET with v1 weights here: http://ratchet.lucidifai.com/

Minashraf commented 2 years ago

That's great, because I think it will take a long time to run it on colab free edition, thank you !