Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xu-justin/fiftyone-plotly-dash
Integrating fiftyone image embeddings to web browser using plotly-dash.
https://github.com/xu-justin/fiftyone-plotly-dash
dash embeddings fiftyone plolty
Last synced: 6 days ago
JSON representation
Integrating fiftyone image embeddings to web browser using plotly-dash.
- Host: GitHub
- URL: https://github.com/xu-justin/fiftyone-plotly-dash
- Owner: Xu-Justin
- Created: 2022-06-24T14:03:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-29T15:14:20.000Z (over 2 years ago)
- Last Synced: 2023-05-19T07:33:53.465Z (over 1 year ago)
- Topics: dash, embeddings, fiftyone, plolty
- Language: Python
- Homepage:
- Size: 14.8 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fiftyone-plotly-dash
This repository integrates [fiftyone image embeddings](https://voxel51.com/docs/fiftyone/tutorials/image_embeddings.html) to web browser using [plotly-dash](https://plotly.com/dash/), so that user no longer need to use jupyter notebook or jupyter lab to preview and interact with image embeddings plot.
## Usage
The program `app_flask.py` responsible to serve fiftyone application, while the program `app_dash.py` responsible to serve plotly plot on dash server. Both programs need to be run parallely in order to work as it should.
Run the following command on terminal to clone this repository, then execute `run.sh` to run `app_flask.py` and `app_dash.py` in parallel.
```
git clone https://github.com/Xu-Justin/fiftyone-plotly-dash.git
cd fiftyone-plotly-dash
./run.sh
```## API
| Method | Route | Description |
|:----------:|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `GET` | `url:6001/embedding/` | Display image embeddings plot of ``.
This API will automatically send `POST` `url:6001/compute`, if `.pickle` is not found on cache folder. |
| `GET` | `url:6001/fiftyone/` | Display selected image embeddings scatter of `` on fiftyone interface.| Method | Route | JSON | Description |
|:----------:|-----------------------------------|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `POST` | `url:6001/compute` |'name' :str| Compute image embeddings of `` and saved the result to `.pickle` on cache folder. |
| `POST` | `url:6001/fiftyone/update` |'name' :str| Update fiftyone view of to only contains images. |
'ids' :list
| `POST` | `url:6001/fiftyone/save/view` | - | Save current fiftyone session view to dataset. |
| `POST` | `url:6001/delete/cache` | - | Delete all cache. |## Docker
It is recommended to do the inference inside a docker container to prevent version conflicts. The container image for this project is available on [Docker Hub](https://hub.docker.com/repository/docker/jstnxu/fiftyone-plotly-dash) and can be pulled using the following commands.
```
docker pull jstnxu/fiftyone-plotly-dash
```The following commands will run the docker image.
```
docker run -it --ipc=host -v :/root/.fiftyone/ -p :6000-6003 --rm jstnxu/fiftyone-plotly-dash
```---
This project was developed as part of Nodeflux Internship x Kampus Merdeka.