transformers/examples/research_projects/visual_bert
Thomas Bauwens 8f137b2427
Move DataCollatorForMultipleChoice from the docs to the package (#34763)
* Add implementation for DataCollatorForMultipleChoice based on docs.

* Add DataCollatorForMultipleChoice to import structure.

* Remove custom DataCollatorForMultipleChoice implementations from example scripts.

* Remove custom implementations of DataCollatorForMultipleChoice from docs in English, Spanish, Japanese and Korean.

* Refactor torch version of DataCollatorForMultipleChoice to be more easily understandable.

* Apply suggested changes and run make fixup.

* fix copies, style and fixup

* add missing documentation

* nits

* fix docstring

* style

* nits

* isort

---------

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: Arthur Zucker <arthur.zucker@gmail.com>
2025-02-13 12:01:28 +01:00
..
demo.ipynb Move DataCollatorForMultipleChoice from the docs to the package (#34763) 2025-02-13 12:01:28 +01:00
extracting_data.py Apply ruff flake8-comprehensions (#21694) 2023-02-22 09:14:54 +01:00
modeling_frcnn.py Refactor: Removed un-necessary object base class (#32230) 2024-07-26 10:33:02 +02:00
processing_image.py update ruff version (#30932) 2024-05-22 06:40:15 +02:00
README.md Updates the default branch from master to main (#16326) 2022-03-23 03:46:59 -04:00
requirements.txt Bump tornado from 6.4.1 to 6.4.2 in /examples/research_projects/visual_bert (#34887) 2024-11-25 12:54:55 +00:00
utils.py update ruff version (#30932) 2024-05-22 06:40:15 +02:00
visualizing_image.py update ruff version (#30932) 2024-05-22 06:40:15 +02:00

VisualBERT Demo

This demo shows usage of VisualBERT VQA model and is adapted from LXMERT demo present here.

  1. make a virtualenv: virtualenv venv and activate source venv/bin/activate
  2. install reqs: pip install -r ./requirements.txt
  3. usage is as shown in demo.ipynb