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

which version is damo/mplug_visual-question-answering_coco_large_en used in modelscope? And there is memory leak with pipeline inference... #1

Open
aixiaodewugege opened this issue May 10, 2023 · 0 comments

Comments

@aixiaodewugege
Copy link

Hi, thanks for your work!

I used your model with modelscope, but I didn't find which model size is the default setting in modelscope, I only know is its named mplug_visual-question-answering_coco_large_en.

And I found that there is memory leak with following code.

pipeline_vqa = pipeline(Tasks.visual_question_answering, model=model_id)
for image_path in image_paths:
    count = count + 1
    raw_image = Image.open(image_path).convert('RGB')
    image_list.append(raw_image)
    image_name_list.append(os.path.basename(image_path))
    question = "what is the man doing in the picture?"
    input_vqa = {
        'image': image_path,
        'question': question,
    }

    text = pipeline_vqa(input_vqa)  # {'text': 'talking on phone'}
    text = text['text']
    result_list.append(text)
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