{"id":16556286,"url":"https://github.com/asynctaskcoffee/backgroundremove-hms-core","last_synced_at":"2025-04-04T21:25:27.251Z","repository":{"id":170454083,"uuid":"343736103","full_name":"AsynctaskCoffee/BackgroundRemove-HMS-Core","owner":"AsynctaskCoffee","description":"BackgroundErase with image-segmentation model HMS Core","archived":false,"fork":false,"pushed_at":"2021-03-23T15:56:07.000Z","size":539,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T06:12:38.682Z","etag":null,"topics":["cloud","hms","hmscore","huawei-mobile-services","imagesegmentation","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsynctaskCoffee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-02T10:33:49.000Z","updated_at":"2021-06-26T15:22:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8232722-b5eb-470e-ae88-3547e5e2df4c","html_url":"https://github.com/AsynctaskCoffee/BackgroundRemove-HMS-Core","commit_stats":null,"previous_names":["asynctaskcoffee/backgroundremove-hms-core"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FBackgroundRemove-HMS-Core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FBackgroundRemove-HMS-Core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FBackgroundRemove-HMS-Core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FBackgroundRemove-HMS-Core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsynctaskCoffee","download_url":"https://codeload.github.com/AsynctaskCoffee/BackgroundRemove-HMS-Core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247250733,"owners_count":20908416,"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":["cloud","hms","hmscore","huawei-mobile-services","imagesegmentation","machine-learning"],"created_at":"2024-10-11T20:04:04.777Z","updated_at":"2025-04-04T21:25:27.228Z","avatar_url":"https://github.com/AsynctaskCoffee.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BackgroundRemove-HMS-Core\nBackgroundErase with image-segmentation model HMS Core\n\n\n\u003cimg src = \"previews/img1.jpeg\" width =\"300\" /\u003e \u003cimg src = \"previews/img2.jpeg\" width =\"300\" /\u003e\n\n\n### Methods\n\n```kotlin\nfun onStartProcess()\nfun onEndProcess()\nfun onResultReady(bitmap: Bitmap?)\nfun onError(exception: Exception?)\n```\n\n### Lib usage\n\n```kotlin\ncompanion object {\n        private var mAnalyzer: MLImageSegmentationAnalyzer\n\n        init {\n            val analyzerSetting = MLImageSegmentationSetting.Factory()\n                .setExact(true)\n                .setAnalyzerType(MLImageSegmentationSetting.BODY_SEG)\n                .setScene(MLImageSegmentationScene.FOREGROUND_ONLY)\n                .create()\n\n            MLAnalyzerFactory.getInstance().getImageSegmentationAnalyzer(analyzerSetting).also {\n                mAnalyzer = it\n            }\n        }\n\n        @JvmStatic\n        fun eraseAndReturnResult(bitmap: Bitmap, eraserListener: EraserListener?) {\n            val mlFrame = MLFrame.fromBitmap(bitmap)\n            mAnalyzer.asyncAnalyseFrame(mlFrame)\n                .addOnSuccessListener { returnImageSegmentation -\u003e\n                    eraserListener?.onResultReady(returnImageSegmentation.foreground)\n                }\n                .addOnFailureListener { exception -\u003e\n                    eraserListener?.onError(exception)\n                }\n        }\n}\n```\n\n\n## Reference [HMS-Core Image Segmentation](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/image-segmentation-0000001050040109)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasynctaskcoffee%2Fbackgroundremove-hms-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasynctaskcoffee%2Fbackgroundremove-hms-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasynctaskcoffee%2Fbackgroundremove-hms-core/lists"}