{"id":13520191,"url":"https://github.com/policratus/sparkmage","last_synced_at":"2025-03-31T16:30:52.568Z","repository":{"id":79081945,"uuid":"85994917","full_name":"policratus/sparkmage","owner":"policratus","description":"🐘 A tool for blazing fast analysis and clustering of similar images using 🐘 Hadoop and ⚡ Spark.","archived":true,"fork":false,"pushed_at":"2017-07-13T14:04:07.000Z","size":190,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T05:22:59.444Z","etag":null,"topics":["big-data","computer-vision","hadoop","image-processing","spark"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/policratus.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}},"created_at":"2017-03-23T20:34:25.000Z","updated_at":"2023-01-28T00:46:01.000Z","dependencies_parsed_at":"2023-05-31T14:30:55.804Z","dependency_job_id":null,"html_url":"https://github.com/policratus/sparkmage","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/policratus%2Fsparkmage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/policratus%2Fsparkmage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/policratus%2Fsparkmage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/policratus%2Fsparkmage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/policratus","download_url":"https://codeload.github.com/policratus/sparkmage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222670691,"owners_count":17020513,"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":["big-data","computer-vision","hadoop","image-processing","spark"],"created_at":"2024-08-01T05:02:13.688Z","updated_at":"2024-11-02T03:30:33.139Z","avatar_url":"https://github.com/policratus.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# 👁✨ sparkmage\n\n![Pets Cluster](https://github.com/policratus/sparkmage/blob/master/docs/clusters.jpg)\n\n## 🛠 Installation\nAssuming that you've a Unix like OS or emulation, [git](https://git-scm.com/), [Python](https://www.python.org/) 2 or 3 and [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) installed, just issue:\n\n```\nmkvirtualenv sparkmage\nworkon sparkmage\ngit clone git@github.com:policratus/sparkmage.git\ncd sparkmage\npip install -r requirements/requirements.txt\n```\n\n## ⚙Usage\nSparmage needs [Hadoop](https://hadoop.apache.org/) (HDFS) (tested on 2.7) and [Spark](http://spark.apache.org/) (tested on 2.1) cluster as a distributed file system and processor.\n\n### 🎯Acquiring images\nAll images are imported from [Google Images](https://images.google.com). To use a specific term and download images from this term:\n\n```\nsparkmage get [term] [directory]\n```\n\nFor instance, if you wish to search for dogs, just issue `sparkmage get dogs /path/to/dogs/`\n\n### 💽Storing images\nAll images are first stored on local file system and after this, it's uploaded to Hadoop HDFS. To copy images from a local directory to HDFS:\n\n```\nsparkmage put http://[host]:[port] [user] [local-dir] [hdfs-dir]\n```\n\nIf you want to upload your just downloaded dog images, assuming that your HDFS endpoint is `master:50070`, user owner will be `hadoop`, and your target directory is `/images/dogs`, execute `sparkmage put http://master:50070 hadoop /path/to/dogs /images/dogs`.\n\n### 📊Analyzing images\nNow, comes the time to analyze all images and separate it in groups. Just execute:\n\n```\nsparkmage analyze hdfs://[host]:[port]/path/on/hdfs \\\n    hdfs://[host]:[port]/cluster/output/dir \\\n    [number_of_groups]\n```\n\nTo analyze your just uploaded dog images and find five groups on it, execute `sparkmage analyze hdfs://master:50070/images/dogs hdfs://master:50070/clusters/dogs/clusters.out 5`.\n\n### 👁Visualizing groups\nSo this is the final step: see your images and find what group it pertains. Do this:\n\n```\nsparkmage save http://[host]:[port] [user] [local-dir] http://[host]:[port]/cluster/output/dir\n```\n\nFor instance, to cluster your dogs images: `sparkmage save http://master:50070 hadoop /path/to/dogs http://master:50070/clusters/dogs/clusters.out`.\n\nThe cluster that image pertains will be put inside the image itself, as a watermark.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolicratus%2Fsparkmage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolicratus%2Fsparkmage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolicratus%2Fsparkmage/lists"}