{"id":18736690,"url":"https://github.com/digitalslidearchive/superpixel-classification","last_synced_at":"2025-08-08T04:36:32.637Z","repository":{"id":142811971,"uuid":"531621335","full_name":"DigitalSlideArchive/superpixel-classification","owner":"DigitalSlideArchive","description":"A test cli for classifying superpixels with arbitrary labels","archived":false,"fork":false,"pushed_at":"2024-09-24T17:10:14.000Z","size":82,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-26T14:01:39.867Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DigitalSlideArchive.png","metadata":{"files":{"readme":"README.rst","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":"2022-09-01T17:31:17.000Z","updated_at":"2024-09-24T17:10:19.000Z","dependencies_parsed_at":"2024-01-17T21:07:51.946Z","dependency_job_id":"a320b746-9803-4224-a8de-66915d8f3862","html_url":"https://github.com/DigitalSlideArchive/superpixel-classification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalSlideArchive%2Fsuperpixel-classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalSlideArchive%2Fsuperpixel-classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalSlideArchive%2Fsuperpixel-classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalSlideArchive%2Fsuperpixel-classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DigitalSlideArchive","download_url":"https://codeload.github.com/DigitalSlideArchive/superpixel-classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248621130,"owners_count":21134753,"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":["hacktoberfest"],"created_at":"2024-11-07T15:22:09.379Z","updated_at":"2025-04-12T19:31:47.768Z","avatar_url":"https://github.com/DigitalSlideArchive.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Superpixel Classification\n=========================\n\nThis can be built like so::\n\n    docker build --force-rm -t dsarchive/superpixel .\n\nTo run it from the command line, you'll need to specify some parameters, notably for girder client and for various folders::\n\n    docker run --gpus all --rm -it dsarchive/superpixel SuperpixelClassification \\\n    --api-url http://\u003cgirder server:port\u003e/api/v1 \\\n    --girder-token \u003c64-hexadecimal digit token\u003e \\\n    62fd07a6e370d0bad9dd241b \\\n    --features 630d01243be9b4f10182cfb1 \\\n    --modeldir 630d012a3be9b4f10182cfb2 \\\n    --annotationdir 630d14b7384b2fd595b4cf54 \\\n    --workers 8\n\nWhat It Does\n------------\n\nInternally, place a collection of large_images in a folder and use that folder Id as the primary.  Create folders to store annotations, models, and features.\n\n(1) uses the HistomicsTK superpixel algorithm (which is just SLIC) to create superpixels.  These are stored in a large_image_annotation annotation element with ``values`` for the classes and ``user.bbox`` with the bounding box of each superpixel (this is 4 times the length of values and has left, top, right, bottom for each superpixel).\n\n(2) Gets the region of each bound boxing at a specific scale and uses the raw pixels as the feature vector.\n\nThe user is expected to label some of the images on the \"Superpixel Epoch \u003cmost recent\u003e\" annotation.  Creating a .histomicsui_config.yaml in the same directory as the images is useful to define your labels.  This file will contain something like::\n\n    ---\n    annotationGroups:\n      replaceGroups: true\n      defaultGroup: default\n      groups:\n        -\n          id: Tissue\n          fillColor: rgba(255, 255, 0, 0.25)\n          lineColor: rgb(255, 255, 0)\n          lineWidth: 2\n        -\n          id: Background\n          fillColor: rgba(255, 0, 0, 0.25)\n          lineColor: rgb(255, 0, 0)\n          lineWidth: 2\n        -\n          id: Marker\n          fillColor: rgba(0, 0, 255, 0.25)\n          lineColor: rgb(0, 0, 255)\n          lineWidth: 2\n\n(3) Will train a model based off of a keras example for image classification.\n\n(4) Emits a pair of new annotations for each prepared image.  One for the next epoch of labels and is a direct copy of the previous epoch.  The other has the predictions which labels the superpixels accordingly.  The predicted class is in the annotation element ``values`` array, ``user.bbox`` is based on the original annotation, ``user.confidence`` is an array with one entry per value containing a number from [0-1] which is the maximum softmax value from the predicted classes, ``user.categoryConfidence`` is an array with one entry per value, containing an array the same length as the ``categories`` (labels) with the raw logit value from the prediction.\n\nFuture\n------\n\nThis should be refactored to use classes to make it easy to abstract the base process.  Specifically, this (1) selects image regions, (2) creates feature vectors per region, (3) trains a model using those features and some labels, (4) predicts labels based on that model.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalslidearchive%2Fsuperpixel-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalslidearchive%2Fsuperpixel-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalslidearchive%2Fsuperpixel-classification/lists"}