Doug Blank commited on
Commit
c860d6f
1 Parent(s): 42fd9a2

Example with cppe-5

Browse files
Files changed (3) hide show
  1. Dockerfile +13 -0
  2. README.md +96 -1
  3. requirements.txt +1 -0
Dockerfile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+
9
+ COPY . .
10
+
11
+ CMD kangas import --huggingface cppe-5 cppe-5.datagrid --options split=test labels=objects:category bbox=objects:bbox:xywh ids=objects:id
12
+
13
+ CMD kangas server cppe-5.datagrid --frontend-port=7860
README.md CHANGED
@@ -8,4 +8,99 @@ pinned: false
8
  license: apache-2.0
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  license: apache-2.0
9
  ---
10
 
11
+ # Kangas: Explore Multimedia Datasets at Scale :kangaroo:
12
+
13
+ Kangas is a tool for exploring, analyzing, and visualizing large-scale multimedia data. It provides a straightforward Python API
14
+ for logging large tables of data, along with an intuitive visual interface for performing complex queries against your dataset.
15
+
16
+ The key features of Kangas include:
17
+
18
+ - **Scalability**. Kangas DataGrid, the fundamental class for representing datasets, can easily store millions of rows of data.
19
+ - **Performance**. Group, sort, and filter across millions of data points in seconds with a simple, fast UI.
20
+ - **Interoperability**. Any data, any environment. Kangas can run in a notebook or as a standalone app, both locally and remotely.
21
+ - **Integrated computer vision support**. Visualize and filter bounding boxes, labels, and metadata without any extra setup.
22
+
23
+ You can access a live demo of Kangas at <a href="https://kangas.comet.com?datagrid=/data/coco-500.datagrid">kangas.comet.com</a>.
24
+
25
+ ## Getting Started
26
+
27
+ Kangas is accessible as a Python library via pip
28
+ ```
29
+ pip install kangas
30
+ ```
31
+
32
+ Once installed, there are many ways to load or create a DataGrid.
33
+
34
+ Without writing any code, you can even download a DataGrid and begin exploring the data. At the console:
35
+
36
+ ```
37
+ kangas server https://github.com/caleb-kaiser/kangas_examples/raw/master/coco-500.datagrid.zip
38
+ ```
39
+
40
+ That's it!
41
+
42
+ In the next example, we load a publicly available DataGrid file, but the Kangas API also provides methods for ingesting CSVs, Pandas DataFrames, and for manually constructing a new DataGrid:
43
+
44
+ ```python
45
+ import kangas as kg
46
+
47
+ # Load an existing DataGrid
48
+ dg = kg.read_datagrid("https://github.com/caleb-kaiser/kangas_examples/raw/master/coco-500.datagrid.zip")
49
+ ```
50
+
51
+ After your DataGrid is initialized, you can render it within the Kangas Viewer directly from Python:
52
+
53
+ ```python
54
+ dg.show()
55
+ ```
56
+ <img width="1789" alt="image" src="https://user-images.githubusercontent.com/42076840/197875668-5519d504-2209-472f-952e-ed09554ecb7a.png">
57
+
58
+ From the Kangas Viewer, you can group, sort, and filter data. In addition, Kangas will do its best to parse any metadata attached to your assets. For example, if you're using the COCO-500 DataGrid from the quickstart above, Kangas will automatically parse labels and scores for each image:
59
+
60
+ <img src="https://github.com/caleb-kaiser/kangas_examples/blob/master/Oct-25-2022%2016-43-56.gif">
61
+
62
+ And voil&agrave;! Now you're started using Kangas.
63
+
64
+ ### Pandas DataFrames
65
+
66
+ Kangas can also read Pandas DataFrame objects directly:
67
+
68
+ ```python
69
+ import kangas as kg
70
+ import pandas as pd
71
+
72
+ df = pd.DataFrame({"hidden_layer_size": [8, 16, 64], "loss": [0.97, 0.53, 0.12]})
73
+ dg = kg.read_dataframe(df)
74
+ ```
75
+ ### HuggingFace Datasets
76
+
77
+ HuggingFace's datasets can also be loaded into DataGrid directly because they use
78
+ rows of dictionaries, and images are represented by PIL images. DataGrid will
79
+ automatically convert PIL images into a [Kangas Image](https://github.com/comet-ml/kangas/wiki/Image#image):
80
+
81
+ ```python
82
+ import kangas as kg
83
+ from datasets import load_dataset
84
+
85
+ dataset = load_dataset("beans", split="train")
86
+ dg = kg.DataGrid(dataset)
87
+ ```
88
+
89
+ ### Parquet files
90
+
91
+ > **Note**: You will need to have pyarrow installed to read parquet files.
92
+
93
+ ```python
94
+ import kangas as kg
95
+
96
+ dg = kg.read_parquet("https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata5.parquet")
97
+ ```
98
+
99
+ If you'd like to explore further, take a look at our example notebooks below:
100
+
101
+ ## Documentation
102
+
103
+ 1. <a href="https://github.com/comet-ml/kangas/wiki">Documentation Homepage</a>
104
+ 2. <a href="https://github.com/comet-ml/kangas/blob/main/notebooks/DataGrid-Getting%20Started.ipynb">Quickstart Notebook</a> <a href="https://colab.research.google.com/github/comet-ml/kangas/blob/main/notebooks/DataGrid-Getting%20Started.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg"></a>
105
+ 3. <a href="https://github.com/comet-ml/kangas/blob/main/notebooks/Integrations.ipynb">Integrations Notebook</a> <a href="https://colab.research.google.com/github/comet-ml/kangas/blob/main/notebooks/Integrations.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg"></a>
106
+ 4. <a href="https://github.com/comet-ml/kangas/blob/main/examples/mnist_script.py"> MNIST Classification Example</a>
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ kangas