Skip to content

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

@aixiaodewugege

Description

@aixiaodewugege

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions