Code Monkey home page Code Monkey logo

r-bench's Introduction

R-Bench

teaser

This repo is for the paper Evaluating and Analyzing Relationship Hallucinations in Large Vision-Language Models (ICML2024).

@inproceedings{
wu2024evaluating,
title={Evaluating and Analyzing Relationship Hallucinations in Large Vision-Language Models},
author={Mingrui Wu and Jiayi Ji and Oucheng Huang and Jiale Li and Yuhang Wu and Xiaoshuai Sun and Rongrong Ji},
booktitle={Forty-first International Conference on Machine Learning},
year={2024},
url={https://openreview.net/forum?id=xpSlt67vxQ}
}

Data

Download R-Bench. The main annotation files include:

- image-level_filterd.json
- instance-level_filterd.json
- nocaps_pope_obj_random_image.json
- nocaps_pope_obj_popular_image.json
- nocaps_pope_obj_adversarial_image.json
- web_data

These files contain annotations for image-level, instance-level, pope-object, and web-data questions. For image-level and instance-level questions, we randomly sampled five subsets into the [type]_ids_[subset].json files.

Download the images from Open Image validation set (v4).

Eval

To run LVLM on R-Bench using the official inference script of the LVLMs, and format the result file as follows:

{"question_id": 0, "text":[model output]}
{"question_id": 1, "text":[model output]}
...

Tips: We provide instance-level question tools in utils.py. Please use the draw_mask and draw_box functions to draw the mask and box on input images, respectively. Additionally, use the instance_qs_construct function to reformat the instance questions.

And eval with,

sh eval.sh

Acknowledge

The evaluation code is based on POPE.

r-bench's People

Contributors

mrwu-mac avatar

Stargazers

Jihoon Oh avatar Tiancheng Zhao (Tony)  avatar Yiming Cao avatar  avatar Neok avatar  avatar

Watchers

Kostas Georgiou avatar  avatar

r-bench's Issues

关于eval所用的image dataset以及eval.sh中的typo以及具体的流程

作者您好,目前我遇到三个问题,1. 请问所用的Open image dataset v7是test set还是validation set. 2.似乎eval.sh中需要把eval_pope.py都改为eval.py. 3. eval的具体流程是先调用utils中的draw_mask and draw_box对图片进行处理,然后应该(?)使用infer进行推理生成QA对并以提供的格式后dump json后再运行eval.sh。请问是这样的链路嘛,还有想问问这个infer的代码有提供嘛?如果有理解错误也感谢指出,希望作者能够回答~十分感谢~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.