---
language: [en]
license: mit
datasets: [MobileViews]
pretty_name: "MobileViews: A Large-Scale Mobile GUI Dataset"
tags:
  - mobile-ui
  - user-interfaces
  - view-hierarchy
  - android-apps
  - screenshots
task_categories:
  - question-answering
  - image-to-text
task_ids:
  - task-planning
  - visual-question-answering
---
# MobileViews: A Large-Scale Mobile GUI Dataset
[**Read the paper**](https://arxiv.org/abs/2409.14337)

**MobileViews** is a large-scale dataset designed to support research on mobile user interface (UI) analysis and mobile agents. The first version — **MobileViews-600K** — contains over **600,000** mobile UI screenshot-view hierarchy (VH) pairs, collected from approximately **20,000 apps** on the Google Play Store.

## Dataset Overview

The `zip` and `parquet` files with the same index contain the same screenshots and VH files, so you can choose whichever format you prefer to download and use.

- **`MobileViews_0-150000.zip`**, **`MobileViews_0-150000.parquet`** and **`MobileViews_index_0-150000.csv`**: The first set of screenshot-VH pairs, containing IDs from 0 to 150,000.

- **`MobileViews_150001-291197.zip`**, **`MobileViews_150001-291197.parquet`** and **`MobileViews_index_150001-291197.csv`**: The second set of screenshot-VH pairs, containing IDs from 150,001 to 291,197.

- **`MobileViews_300000-400000.zip`**, **`MobileViews_300000-400000.parquet`** and **`MobileViews_index_300000-400000.csv`**: The third set of screenshot-VH pairs, containing IDs from 300,000 to 400,000.

- **`MobileViews_400001-522301.zip`**, **`MobileViews_400001-522301.parquet`** and **`MobileViews_index_400001-522301.csv`**: The fourth set of screenshot-VH pairs, containing IDs from 400,001 to 522,301.

- **`AppMetadata.csv`**: Metadata for **15,000 apps** from the Google Play Store, retrieved in **June 2024**.

### CSV and Parquet Column Descriptions

Both the CSV and Parquet files provide mappings between images and JSON view hierarchy files.

1. **CSV Columns**

    | Column       | Description                               |
    |--------------|-------------------------------------------|
    | `Image File` | Filename of the screenshot (e.g., 0.jpg)  |
    | `JSON File`  | Filename of the view hierarchy (e.g., 0.json) |

    **Example:**
    ```csv
    Image File,JSON File
    300000.jpg,300000.json
    300001.jpg,300001.json
    300002.jpg,300002.json
    ```
Here’s the updated section of the README for the MobileViews open-sourced dataset, modified to reflect that the Parquet columns are `image_content` and `json_content` instead of `image_path`:

---

2. **Parquet Columns**

    | Column          | Description                                                              |
    |-----------------|--------------------------------------------------------------------------|
    | `image_content` | Binary data representing the image file (e.g., screenshot in `.jpg` format) |
    | `json_content`  | JSON content representing the view hierarchy for the corresponding image |

    **Example Data in Parquet:**

    | image_content          | json_content                                                         |
    |------------------------|----------------------------------------------------------------------|
    | Binary image data       | `{"viewHierarchy": {"bounds": [0, 0, 1080, 1920], "viewClass": ...}`  |
    | Binary image data       | `{"viewHierarchy": {"bounds": [0, 0, 1080, 1920], "viewClass": ...}`  |
    | Binary image data       | `{"viewHierarchy": {"bounds": [0, 0, 1080, 1920], "viewClass": ...}`  |

    The **`image_content`** column contains the binary image data for each screenshot, which can be converted back into a `.jpg` image. The **`json_content`** column stores the JSON string with the view hierarchy details for each corresponding image.

### AppMetadata.csv Columns

The `AppMetadata.csv` file contains detailed information about each app. The columns are as follows:

| Column              | Description                                                      |
|---------------------|------------------------------------------------------------------|
| `title`             | App title                                                        |
| `installs`          | Number of installs                                               |
| `minInstalls`       | Minimum number of installs                                       |
| `realInstalls`      | Real number of installs                                          |
| `score`             | App score (rating)                                               |
| `ratings`           | Number of ratings                                                |
| `reviews`           | Number of reviews                                                |
| `histogram`         | Rating distribution                                              |
| `price`             | App price                                                        |
| `free`              | Whether the app is free (True/False)                        |
| `offersIAP`         | Offers in-app purchases (True/False)                             |
| `inAppProductPrice` | In-app product price                                             |
| `developer`         | Developer name                                                   |
| `developerId`       | Developer ID                                                     |
| `genre`             | App genre                                                        |
| `genreId`           | Genre ID                                                         |
| `categories`        | App categories                                                   |
| `contentRating`     | Content rating (e.g., Everyone, Teen)                            |
| `adSupported`       | Indicates if the app is ad-supported (True/False)                |
| `containsAds`       | Indicates if the app contains ads (True/False)                   |
| `released`          | App release date                                                 |
| `lastUpdatedOn`     | Date of the latest update                                        |
| `appId`             | Unique app identifier                                            |

## How to Use

### Download via Hugging Face Python Library
   
**Install the library:**

```bash
pip install huggingface_hub
```

**Download specific files:**

```python
from huggingface_hub import hf_hub_download

# Download specific files
hf_hub_download(repo_id="mllmTeam/MobileViews", filename="MobileViews_0-150000.parquet")
hf_hub_download(repo_id="mllmTeam/MobileViews", filename="MobileViews_0-150000.zip")
hf_hub_download(repo_id="mllmTeam/MobileViews", filename="AppMetadata.csv")
```

**Download the entire repository:**

```python
from huggingface_hub import snapshot_download

# Download the entire repository
snapshot_download(repo_id="mllmTeam/MobileViews")
```

### The usage of `zip` files

We recommend verifying the completeness and integrity of the files before unzipping them by following these steps.

**Example for `MobileViews_0-150000.zip`:**

```bash
# Integrity check
zip -T MobileViews_0-150000.zip   # Expected output: test of MobileViews_0-150000.zip OK

# Verify file counts (JSON and JPG)
unzip -l MobileViews_0-150000.zip | grep ".json" | wc -l  # Expected output: 150001
unzip -l MobileViews_0-150000.zip | grep ".jpg" | wc -l   # Expected output: 150001

# Verify file size
du -sh MobileViews_0-150000.zip  # Expected output: 23G

# Verify SHA256 checksum
sha256sum -c MobileViews_0-150000.zip.sha256  # Expected output: MobileViews_0-150000.zip: OK

# Unzip
unzip MobileViews_0-150000.zip
```

**Expected Outputs for Other ZIP Files:**

- **MobileViews_150001-291197.zip**:
    - Integrity: `test of MobileViews_150001-291197.zip OK`
    - JSON count: `141197`
    - JPG count: `141197`
    - Size: `36G`
    - SHA256: `MobileViews_150001-291197.zip: OK`

- **MobileViews_300000-400000.zip**:
    - Integrity: `test of MobileViews_300000-400000.zip OK`
    - JSON count: `100001`
    - JPG count: `100001`
    - Size: `24G`
    - SHA256: `MobileViews_300000-400000.zip: OK`

- **MobileViews_400001-522301.zip**:
    - Integrity: `test of MobileViews_400001-522301.zip OK`
    - JSON count: `122301`
    - JPG count: `122301`
    - Size: `13G`
    - SHA256: `MobileViews_400001-522301.zip: OK`

## The usage of `parquet` files

`Parquet` is an efficient, compressed columnar storage format optimized for large datasets. You can learn more about [Parquet](https://parquet.apache.org/docs).

We provide `useparquet.py`, which includes functions such as `check_row_count`, `save_n_images_and_jsons`, and `save_all_images_and_jsons` to help you quickly access the dataset. 

If you need additional functionality, you can refer to the [`pyarrow`](https://arrow.apache.org/docs/python/generated/pyarrow.parquet.ParquetFile.html) documentation to explore more APIs.

```bash
pip install pyarrow

# check the path and the function you need
python path/to/useparquet.py
```

## Citation

If you use this dataset in your research, please cite our work as follows:

```
@misc{gao2024mobileviewslargescalemobilegui,
      title={MobileViews: A Large-Scale Mobile GUI Dataset}, 
      author={Longxi Gao and Li Zhang and Shihe Wang and Shangguang Wang and Yuanchun Li and Mengwei Xu},
      year={2024},
      eprint={2409.14337},
      archivePrefix={arXiv},
      primaryClass={cs.HC},
      url={https://arxiv.org/abs/2409.14337}, 
}
```