CoolFace
Apppublic

robinhad/data-annotation

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
README.md169 linesDownload Raw Back to root
1---2title: Data Annotation3emoji: ๐ŸŸง4colorFrom: yellow5colorTo: purple6sdk: docker7tags:8- label-studio9fullwidth: true10license: apache-2.011app_port: 808012---13<img src="https://user-images.githubusercontent.com/12534576/192582340-4c9e4401-1fe6-4dbb-95bb-fdbba5493f61.png"/>14 15[Website](https://hubs.ly/Q01CNgsd0) โ€ข [Docs](https://hubs.ly/Q01CN9Yq0) โ€ข [12K+ GitHub โญ๏ธ!](https://hubs.ly/Q01CNbPQ0) โ€ข [Slack Community](https://hubs.ly/Q01CNb9H0)16 17## What is Label Studio?18 19Label Studio is an open source data labeling platform. It lets you label audio,20text, images, videos, and time series data with a simple, straightforward, and21highly-configurable user interface. Label Studio can prepare new data or22improve existing training data to get more accurate ML models.23 24 25## Label Studio in Hugging Face Spaces26 27The Label Studio community is thrilled to offer Label Studio as a Hugging Face28Spaces application. You can try the data-annotation interface, connect popular29machine learning models, and share the application with collaborators. You can30start immediately by creating an account or replicate the space and work in31your own environment.32 33## Creating a Use Account and Logging In34 35Begin by creating a new account in the Label Studio space, then log in with your36credentials.37 38**By default, these spaces permit anyone to create a new login39account, allowing them to view and modify project configuration, data sets, and40annotations. Without any modifications, treat this space like a demo environment.**41 42## Creating a Labeling Project43 44After logging in, Label Studio will present you with a project view. Here you45can create a new project with prompts to upload data and set up a custom46configuration interface.47 48**Note that in the default configuration, storage is local and temporary. Any49projects, annotations, and configurations will be lost if the space is restarted.**50 51## Next Steps and Additional Resources52 53To help with getting started, the Label Studio community curated a list of54resources including tutorials and documentation.55 56- ๐Ÿš€ [Zero to One with Label Studio Tutorial](https://labelstud.io/blog/introduction-to-label-studio-in-hugging-face-spaces/)57- ๐Ÿ“ˆ [Try Label Studio Enterprise](https://hubs.ly/Q01CMLll0)58- ๐Ÿค— [Tutorial: Using Label Studio with Hugging Face Datasets Hub](https://danielvanstrien.xyz/huggingface/huggingface-datasets/annotation/full%20stack%20deep%20learning%20notes/2022/09/07/label-studio-annotations-hub.html)59- ๐Ÿ’ก [Label Studio Docs](https://hubs.ly/Q01CN9Yq0)60 61 62![Gif of Label Studio annotating different types of data](https://raw.githubusercontent.com/heartexlabs/label-studio/master/images/annotation_examples.gif)63 64### Making your Label Studio Hugging Face Space production-ready65 66By default this space allows for the unrestricted creation of new accounts67will full access to all projects and data. This is great for trying out68Label Studio and collaborating on projects, but you may want to restrict69access to your space to only authorized users. Add the following environment70variable to your spaces Dockerfile to disable public account creation for71this space.72 73    ENV LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true74 75Set secrets in your space to create an inital user, and log in with your76provided username and password. Do not set these in your Dockerfile, as they77globally visible on a public space.78 79    LABEL_STUDIO_USERNAME80    LABEL_STUDIO_PASSWORD81 82You will need to provide new users with an invitation link to join the space,83which can be found in the Organizations interface of Label Studio.84 85By default this space stores all project configuration and data annotations86in local storage with Sqlite. If the space is reset, all configuration and87annotation data in the space will be lost. You can enable configuration88persistence in one of two ways:89 901. Enabling Persistent Storage in your Space settings and configuring Label91   Studio to write its database and task storage there.92 932. Connecting an external Postgres database and cloud storage to your space,94   guaranteeing that all project and annotation settings are preserved.95 96### Enabling Hugging Face Persistent Storage97 98In the Hugging Face Label Studio Space settings, select the appropriate99Persistent Storage tier. Note that Persistent Storage is a paid add-on.100By default, persistent storage is mounted to /data. In your Space settings,101set the following variables:102 103    LABEL_STUDIO_BASE_DATA_DIR=/data104    ENV STORAGE_PERSISTENCE=1105 106Your space will restart. NOTE: if you have existing settings and data,107they will be lost in this first restart. Data and setting will only be108preserved on subsequent restarts of the space.109 110### Enabling Postgres Database and Cloud Storage111 112Set the following secret variables to match your own hosted instance of113Postgres. We strongly recommend setting these as secrets to prevent leaking114information about your database service to the public in your spaces115definition.116 117    DJANGO_DB=default118    POSTGRE_NAME=<postgres_name>119    POSTGRE_PORT=<db_port>120    POSTGRE_USER=<postgres_user>121    POSTGRE_PASSWORD=<password>122    POSTGRE_PORT=<db_port>123    POSTGRE_HOST=<db_host>124 125Add the following environment variable to remove the warning about ephemeral126storage.127 128    ENV STORAGE_PERSISTENCE=1129 130Note that you will need to connect cloud storage to host data items that you131want to annotate, as local storage will not be preserved across a space reset.132 133By default the only data storage enabled for this space is local. In the case134of a space reset, all data will be lost. To enable permanent storage, you135must enable a cloud storage connector. We also strongly recommend enabling136configuration persistence to preserve project data, annotations, and user137settings. Choose the appropriate cloud connector and configure the secrets138for it.139 140#### Amazon S3141    STORAGE_TYPE=s3142    STORAGE_AWS_ACCESS_KEY_ID="<YOUR_ACCESS_KEY_ID>"143    STORAGE_AWS_SECRET_ACCESS_KEY="<YOUR_SECRET_ACCESS_KEY>"144    STORAGE_AWS_BUCKET_NAME="<YOUR_BUCKET_NAME>"145    STORAGE_AWS_REGION_NAME="<YOUR_BUCKET_REGION>"146    STORAGE_AWS_FOLDER=""147 148#### Google Cloud Storage149 150    STORAGE_TYPE=gcs151    STORAGE_GCS_BUCKET_NAME="<YOUR_BUCKET_NAME>"152    STORAGE_GCS_PROJECT_ID="<YOUR_PROJECT_ID>"153    STORAGE_GCS_FOLDER=""154    GOOGLE_APPLICATION_CREDENTIALS="/opt/heartex/secrets/key.json"155 156Azure Blob Storage157==================158 159    STORAGE_TYPE=azure160    STORAGE_AZURE_ACCOUNT_NAME="<YOUR_STORAGE_ACCOUNT>"161    STORAGE_AZURE_ACCOUNT_KEY="<YOUR_STORAGE_KEY>"162    STORAGE_AZURE_CONTAINER_NAME="<YOUR_CONTAINER_NAME>"163    STORAGE_AZURE_FOLDER=""164 165 166## Questions? Concerns? Want to get involved?167 168Email the community team at [community@labelstud.io](mailto:community@labelstud.io)169