{"id":18305041,"url":"https://github.com/mdbloice/labeller","last_synced_at":"2025-07-04T17:05:14.917Z","repository":{"id":45730118,"uuid":"407081129","full_name":"mdbloice/Labeller","owner":"mdbloice","description":"Quickly set up an image labelling web application for manually tagging images for machine learning tasks.","archived":false,"fork":false,"pushed_at":"2023-10-05T10:51:48.000Z","size":94,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T06:17:38.425Z","etag":null,"topics":["data-centric","data-centric-ai","machine-learning-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdbloice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-16T08:16:01.000Z","updated_at":"2023-11-28T15:44:15.000Z","dependencies_parsed_at":"2024-11-05T15:38:43.224Z","dependency_job_id":"2088f4d2-a479-4b9b-ae21-5a8ca4a6c811","html_url":"https://github.com/mdbloice/Labeller","commit_stats":{"total_commits":116,"total_committers":1,"mean_commits":116.0,"dds":0.0,"last_synced_commit":"3f204589b8f573bc6a3640cd630155ce1ad889fe"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/mdbloice/Labeller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbloice%2FLabeller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbloice%2FLabeller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbloice%2FLabeller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbloice%2FLabeller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdbloice","download_url":"https://codeload.github.com/mdbloice/Labeller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbloice%2FLabeller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259299048,"owners_count":22836462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-centric","data-centric-ai","machine-learning-library"],"created_at":"2024-11-05T15:32:15.971Z","updated_at":"2025-06-11T16:36:06.138Z","avatar_url":"https://github.com/mdbloice.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Labeller-Logo](https://github.com/mdbloice/AugmentorFiles/blob/master/Labeller/Labeller-Logo.png)\n\n[![PyPI install](https://github.com/mdbloice/Labeller/actions/workflows/main.yml/badge.svg)](https://github.com/mdbloice/Labeller/actions/workflows/main.yml)\n\nQuickly set up an image labelling web application for the tagging of images by humans for supervised machine learning tasks.\n\n## Introduction\n\n*Labeller* allows you to quickly set up an image tagging web application for labelling of images.\n\n### Usage\n\n1. Install _Labeller_ using `pip install labeller` from the command line\n2. Navigate to the directory where you wish to create your web application. This directory should contain a subdirectory named `static/images` that contains the images you wish to label\n3. Run `python -m labeller class_1 class_2 ... class_n` where `class_1 class_2 ... class_n` is a list of your class names separated by spaces\n4. Run `python -m flask run` to start the web application\n\nExample:\n\n```bash\n$ python -m labeller One Two Three Four Five\n$ python -m flask run\n```\n\nThis will create an application similar to the following:\n\n![LabellerUI](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/Labeller/LabellerUI.png)\n\nSee the [Options](#options) section for configuration options.\n\nRun `python -m labeller -h` for quick help.\n\n### How Labeller Works\nWhen you create a new labelling application, _Labeller_ will generate a web application based on the number of classes you have defined during initialisation. Images stored in `static/images` will be displayed randomly to the user, and they can be labelled with one of the classes provided during the app initialisation.\n\nThe built application will have the following structure:\n\n```\nproject_folder\n├── app.py\n├── db\n│   └── labels.db\n├── static\n│   ├── favicon.ico\n│   ├── images\n│   │   ├── im_1.jpg\n│   │   ├── im_2.jpg\n│   │   ├── ...\n│   │   └── im_n.jpg\n│   └── styles\n│       └── dashboard.css\n└── templates\n    ├── about.html\n    ├── footer.html\n    ├── index.html\n    ├── labels.html\n    └── navbar.html\n```\n\nThe `labels.db` file is an SQLite database containing the labels for the images that have been labelled so far. To export them to CSV format, run the following:\n\n```\n$ sqlite3 -header -csv labels.db \"select * from labels;\" \u003e labels.csv\n```\n\n## FAQ\n\n- I want to clear the database and start labelling again\n  - Delete the `labels.db` SQLite database in the `db` directory. Generate your application again using `python -m labeller [class_names]` and Labeller will regenerate a new, empty database if no database exists.\n- How can I export the data from the database as a CSV file?\n  - Try something like: `sqlite3 -header -csv labels.db \"select * from labels;\" \u003e labels.csv`\n\nEnsure you place your images in a the directory path `static/images`, so that a path to an image would be `./static/images/im_1.png` for example. In other words your directory structure should look as follows before you build your application:\n\n```\nproject_folder\n└── static\n    └── images\n        ├── im_1.jpg\n        ├── im_2.jpg\n        ├── im_3.jpg\n        ├── ...\n        └── im_n.jpg\n```\n\n## Options\n\nCurrently, the only user definable parameters is the list of class names. This will change as the application develops.\n\n### Flask Options\n_Labeller_ uses Flask as its web development framework. You can pass arguments to Flask as normal when invoking `python -m flask run`, or through environment variables. For example development mode can be enabled by setting an environment variable, e.g: `export FLASK_ENV=development` in Linux (in Windows use `set FLASK_ENV=development` or `$env:FLASK_ENV = \"development\"` in Powershell).\n\nSome common options that can be passed with `python -m flask run` are:\n\n- To serve the application over the network pass `--host=0.0.0.0`, so `python -m flask run --host=0.0.0.0`\n- To use a different port other than the default of 5000, e.g. port 5001, pass `--port 5001`, so `python -m flask run --port 5001`\n\n## Requirements\n\n- Python \u003e=3.5\n\nThe following Python packages are required, and will be downloaded automatically by `pip` during installation:\n\n- `flask`\n- `flask-bootstrap`\n\nas well and their requirements.\n\n## Known Issues\n\n- HTML formatting of generated output needs work\n- Images that are particularly large may have issues rendering and this will be fixed in the next update\n\n## Future Work\n\n- Text snippet labelling\n- Consensus labelling (combining labelling efforts across users)\n- Multi class labelling (labelling an image with more than one label)\n- Free-text tagging/labelling\n- Allow an option to resize all images in the `images` directory to a certain size when creating the web app\n- API access for running instances to get image tags\n- Provide option to not use CDNs for JQuery and Bootstrap\n- Docker image?\n\n## Licence and Acknowledgements\n\nLabeller is made available under the terms of the MIT licence.\n\nLogo created at [LogoMakr.com](https://logomakr.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdbloice%2Flabeller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdbloice%2Flabeller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdbloice%2Flabeller/lists"}