{"id":28370995,"url":"https://github.com/oscarlorentzon/repstruct","last_synced_at":"2025-07-22T19:33:58.935Z","repository":{"id":21289678,"uuid":"24605709","full_name":"oscarlorentzon/repstruct","owner":"oscarlorentzon","description":"Python library for finding representative structures in image collections","archived":false,"fork":false,"pushed_at":"2021-02-24T09:53:22.000Z","size":4248,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T19:42:28.162Z","etag":null,"topics":["bag-of-visual-words","descriptor","image-retrieval","pca-analysis","python"],"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/oscarlorentzon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-29T17:42:18.000Z","updated_at":"2021-03-26T07:30:17.000Z","dependencies_parsed_at":"2022-08-20T16:40:19.941Z","dependency_job_id":null,"html_url":"https://github.com/oscarlorentzon/repstruct","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oscarlorentzon/repstruct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarlorentzon%2Frepstruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarlorentzon%2Frepstruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarlorentzon%2Frepstruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarlorentzon%2Frepstruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oscarlorentzon","download_url":"https://codeload.github.com/oscarlorentzon/repstruct/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarlorentzon%2Frepstruct/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266561336,"owners_count":23948627,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bag-of-visual-words","descriptor","image-retrieval","pca-analysis","python"],"created_at":"2025-05-29T08:07:46.177Z","updated_at":"2025-07-22T19:33:58.911Z","avatar_url":"https://github.com/oscarlorentzon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About repstruct\n\nRepstruct is a python library for finding representative structures in large image collections. It is implemented according to the theory of the Master's thesis [Finding reprensentative structures in large image collections](http://www2.maths.lth.se/vision/education/pages/OscarNils09/) by Oscar Lorentzon and Nils Lundahl.\n\nThe results are obtained by an approach using bags of visual words and colors. The implementation extracts SIFT descriptors as well as colors from the images in the collection and creates feature vectors from histograms created by classifying the features against training data. A collection of images is downloaded from Flickr for a specified tag and the results of the algorithm are presented by plotting the group of closest images and then the most representative.\n\n## Running\nTo be able to download images from [Flickr](https://www.flickr.com/) an API key is required. An API key can be requested from [Flickr's App Garden](https://www.flickr.com/services/apps/create/).\n\nThe rsbundler file can be run from the command line in the following way:\n\n\tbin/run TAG -a FLICKR_API_KEY\n\nThe API key can also be provided by adding a text file called flickr_key.txt with the API key in the root of the project. Then the bundler can be run as follows:\n\n\tbin/run TAG\n\nTo view additional bundler options run the bundler with the -h flag:\n\t\n\tbin/run -h\n\t\n## Continuous integration\n\n[![Build Status](https://travis-ci.org/oscarlorentzon/repstruct.svg?branch=master)](https://travis-ci.org/oscarlorentzon/repstruct)\n[![Coverage Status](https://coveralls.io/repos/oscarlorentzon/repstruct/badge.svg?branch=master)](https://coveralls.io/r/oscarlorentzon/repstruct?branch=master)\n\n## Dependencies\nYou need to have Python 2.7+ and the following libraries to run the algorithm:\n\n* [OpenCV][]\n* [SciPy][]\n* [NumPy][]\n* [Matplotlib][]\n* [Enum34][]\n* [PyYAML][]\n\nThe following libraries are required to run the tests:\n\n* [Setuptools][]\n* [Mock][]\n* [Nose][]\n\n### Installing dependencies on Ubuntu\n\n1. [OpenCV][] - Install by following the steps in the Ubuntu OpenCV [installation guide](https://help.ubuntu.com/community/OpenCV).\n\n2. [NumPy][], [SciPy][], [PyYAML][], [Enum34][], [Setuptools][], [Mock][], [Nose][] and [Matplotlib][] - Install [pip](https://pypi.python.org/pypi/pip) and run:\n\n        sudo apt-get install gfortran\n        sudo pip install -r requirements.txt\n        sudo apt-get install python-matplotlib\n\n## Example output\n\nThe images below show the result from a run using the tag **steppyramid.** The first output image shows the collection images plotted against their feature vector projection onto the third and fourth principal components. \n\n![PCA](example/pca.jpg)\n\nThe second output image shows the result after running the algorithm. On top all collection images are shown, in the middle the thirty closest images are shown and at the bottom the five most representative images are shown.\n\n![Representative](example/representative.jpg)\n\nThe third output image shows the result for finding all structures ordered according to a score based on the representative result.\n\n![Structures](example/structures.jpg)\n\n[OpenCV]: http://opencv.org/ (Computer vision and machine learning software library)\n[NumPy]: http://www.numpy.org/ (Scientific computing with Python)\n[SciPy]: http://www.scipy.org/ (Fundamental library for scientific computing)\n[Matplotlib]: http://matplotlib.sourceforge.net (Plotting in python)\n[Enum34]: https://pypi.python.org/pypi/enum34 (Enum support in python 2.*)\n[PyYAML]: http://pyyaml.org/ (YAML implementations for Python)\n[Setuptools]: http://pythonhosted.org/setuptools/ (Python project packaging)\n[Mock]: http://www.voidspace.org.uk/python/mock/ (Mocking and testing library)\n[Nose]: https://nose.readthedocs.org/en/latest/ (Unit test extensions)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarlorentzon%2Frepstruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foscarlorentzon%2Frepstruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarlorentzon%2Frepstruct/lists"}