task_categories:image-segmentation task_ids:instance-segmentation size_categories:1M<n<10M license:cc-by-4.0 segmentation coco region:us
Progress on object detection is enabled by datasets that focus the research community's attention on open challenges. This process led us from simple images to complex scenes and from bounding boxes to segmentation masks. In this work, we introduce LVIS (pronounced `el-vis'): a new dataset for Large Vocabulary Instance Segmentation. We plan to collect ~2 million high-quality instance segmentation masks for over 1000 entry-level object categories in 164k images. Due to the Zipfian distribution of categories in natural images, LVIS naturally has a long tail of categories with few training samples. Given that state-of-the-art deep learning methods for object detection perform poorly in the low-sample regime, we believe that our dataset poses an important and exciting new scientific challenge.
@inproceedings{gupta2019lvis,
  title={ LVIS: A Dataset for Large Vocabulary Instance Segmentation},
  author={Gupta, Agrim and Dollar, Piotr and Girshick, Ross},
  booktitle={Proceedings of the {IEEE} Conference on Computer Vision and Pattern Recognition},
  year={2019}
}
---
viewer: true
annotations_creators: []
language: []
language_creators: []
license:
- cc-by-4.0
pretty_name: lvis
size_categories:
- 1M<n<10M
source_datasets: []
tags:
- segmentation
- coco
task_categories:
- image-segmentation
task_ids:
- instance-segmentation
---

# LVIS
### Dataset Summary

This dataset is the implementation of LVIS dataset into Hugging Face datasets. Please visit the original website for more information. 

- https://www.lvisdataset.org/

### Loading
This code returns train, validation and test generators.

```python
from datasets import load_dataset

dataset = load_dataset("winvoker/lvis")
```

Objects is a dictionary which contains annotation information like bbox, class.
```
DatasetDict({
    train: Dataset({
        features: ['id', 'image', 'height', 'width', 'objects'],
        num_rows: 100170
    })
    validation: Dataset({
        features: ['id', 'image', 'height', 'width', 'objects'],
        num_rows: 4809
    })
    test: Dataset({
        features: ['id', 'image', 'height', 'width', 'objects'],
        num_rows: 19822
    })
})
```
### Access Generators
```python
train = dataset["train"]
validation = dataset["validation"]
test = dataset["test"] 
```

An example row is as follows.

```json
{  'id': 0, 
   'image': '000000437561.jpg', 
   'height': 480, 
   'width': 640, 
   'objects': {
               'bboxes': [[[392, 271, 14, 3]], 
               'classes': [117], 
               'segmentation': [[376, 272, 375, 270, 372, 269, 371, 269, 373, 269, 373]]
               }
 }
```