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

How to run as an API for specific image and task? #14

Open
nhandang-ai4ia opened this issue Oct 23, 2023 · 1 comment
Open

How to run as an API for specific image and task? #14

nhandang-ai4ia opened this issue Oct 23, 2023 · 1 comment

Comments

@nhandang-ai4ia
Copy link

Hi, thanks for the great work. When i tried test.py on MedVInT_TD, the dataloader return key error Caption. I have checked the download data and see no column name Caption.
I try to approach as wrap it as API which receive images and prompt as input and get the results. However, i am still lost at what is input_ids. Could you elaborate more on this, and how we can use this to serve maybe as FastAPI.

@nhandang-ai4ia
Copy link
Author

Hi, i mange to run, silly me. The dataset version 2 got a column name Caption. From there i understand the input_ids.
The problem is the pretrained model, the error and the current fix is described in #5 . The generated text from the model is awkward. Here is one example:
al CT 221 CT CT CT\u2009 CT\u2009: oftery is occased? comlaced by to the CT scanmonary angiogram? ose: ort Right pul pulary artery : umflex artery C:Right coronary artery D:Left anterior descending arary artery arrow: C
I suspect the rename and key deletion in model checkpoint cause this behaviour. Could the authors help check the pretrained model is up to date?
In the file PMC_QA_Dataset.py, line 95, there is a small typo error: sample['Answer'] not sample['Anwser'].
Thank you

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