Spaces:
Running
Running
File size: 4,532 Bytes
b626d26 23680f2 b626d26 23680f2 b626d26 23680f2 b626d26 23680f2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
---
title: HyperView
emoji: 🔮
colorFrom: purple
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
tags:
- data-visualization
- embeddings
- hyperbolic
- poincare
- clip
- dataset-curation
- computer-vision
- umap
short_description: Dataset visualization with Euclidean & hyperbolic embeddings
models:
- openai/clip-vit-base-patch32
- mnm-matin/hyperbolic-clip
datasets:
- uoft-cs/cifar10
---
# HyperView
> **Open-source dataset curation + embedding visualization (Euclidean + Poincaré disk)**
[](https://opensource.org/licenses/MIT) [](https://deepwiki.com/Hyper3Labs/HyperView) [](https://huggingface.co/spaces/Hyper3Labs/HyperView)
<p align="center">
<a href="https://youtu.be/XLaa8FHSQtc" target="_blank">
<img src="https://raw.githubusercontent.com/Hyper3Labs/HyperView/main/assets/screenshot.png" alt="HyperView Screenshot" width="100%">
</a>
<br>
<a href="https://youtu.be/XLaa8FHSQtc" target="_blank">Watch the Demo Video</a>
</p>
---
## Try it Online
**[Launch HyperView on Hugging Face Spaces](https://huggingface.co/spaces/Hyper3Labs/HyperView)** - no installation required!
The demo showcases:
- 300 CIFAR-10 images with pre-computed embeddings
- CLIP embeddings visualized in Euclidean space (UMAP)
- HyCoCLIP embeddings visualized on the Poincaré disk
---
## Features
- **Dual-Panel UI**: Image grid + scatter plot with bidirectional selection
- **Euclidean/Poincaré Toggle**: Switch between standard 2D UMAP and Poincaré disk visualization
- **HuggingFace Integration**: Load datasets directly from HuggingFace Hub
- **Fast Embeddings**: Uses EmbedAnything for CLIP-based image embeddings
## Quick Start
**Docs:** [docs/datasets.md](docs/datasets.md) · [docs/colab.md](docs/colab.md) · [CONTRIBUTING.md](CONTRIBUTING.md) · [TESTS.md](TESTS.md)
### Installation
```bash
git clone https://github.com/Hyper3Labs/HyperView.git
cd HyperView
# Install with uv
uv venv .venv
source .venv/bin/activate
uv pip install -e ".[dev]"
```
### Run the Demo
```bash
hyperview demo --samples 500
```
This will:
1. Load 500 samples from CIFAR-100
2. Compute CLIP embeddings
3. Generate Euclidean and Poincaré visualizations
4. Start the server at **http://127.0.0.1:6262**
### Python API
```python
import hyperview as hv
# Create dataset
dataset = hv.Dataset("my_dataset")
# Load from HuggingFace
dataset.add_from_huggingface(
"uoft-cs/cifar100",
split="train",
max_samples=1000
)
# Or load from local directory
# dataset.add_images_dir("/path/to/images", label_from_folder=True)
# Compute embeddings and visualization
dataset.compute_embeddings()
dataset.compute_visualization()
# Launch the UI
hv.launch(dataset) # Opens http://127.0.0.1:6262
```
### Google Colab
See [docs/colab.md](docs/colab.md) for a fast Colab smoke test and notebook-friendly launch behavior.
### Save and Load Datasets
```python
# Save dataset with embeddings
dataset.save("my_dataset.json")
# Load later
dataset = hv.Dataset.load("my_dataset.json")
hv.launch(dataset)
```
## Why Hyperbolic?
Traditional Euclidean embeddings struggle with hierarchical data. In Euclidean space, volume grows polynomially ($r^d$), causing **Representation Collapse** where minority classes get crushed together.
**Hyperbolic space** (Poincaré disk) has exponential volume growth ($e^r$), naturally preserving hierarchical structure and keeping rare classes distinct.
<p align="center">
<img src="https://raw.githubusercontent.com/Hyper3Labs/HyperView/main/assets/hyperview_infographic.png" alt="Euclidean vs Hyperbolic" width="100%">
</p>
## Contributing
Development setup, frontend hot-reload, and backend API notes live in [CONTRIBUTING.md](CONTRIBUTING.md).
## Related projects
- **hyper-scatter**: High-performance WebGL scatterplot engine (Euclidean + Poincaré) used by the frontend: https://github.com/Hyper3Labs/hyper-scatter
- **hyper-models**: Non-Euclidean model zoo + ONNX exports (e.g. for hyperbolic VLM experiments): https://github.com/Hyper3Labs/hyper-models
## References
- [Poincaré Embeddings for Learning Hierarchical Representations](https://arxiv.org/abs/1705.08039) (Nickel & Kiela, 2017)
- [Hyperbolic Neural Networks](https://arxiv.org/abs/1805.09112) (Ganea et al., 2018)
## License
MIT License - see [LICENSE](LICENSE) for details.
|