{"id":13454749,"url":"https://github.com/agermanidis/thingscoop","last_synced_at":"2025-08-22T18:07:14.349Z","repository":{"id":35590531,"uuid":"39863341","full_name":"agermanidis/thingscoop","owner":"agermanidis","description":"Search and filter videos based on objects that appear in them using convolutional neural networks","archived":false,"fork":false,"pushed_at":"2016-05-11T16:26:37.000Z","size":5821,"stargazers_count":358,"open_issues_count":1,"forks_count":59,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-28T06:50:08.653Z","etag":null,"topics":[],"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/agermanidis.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}},"created_at":"2015-07-28T23:48:15.000Z","updated_at":"2025-04-19T11:21:09.000Z","dependencies_parsed_at":"2022-09-10T04:05:00.245Z","dependency_job_id":null,"html_url":"https://github.com/agermanidis/thingscoop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agermanidis/thingscoop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agermanidis%2Fthingscoop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agermanidis%2Fthingscoop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agermanidis%2Fthingscoop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agermanidis%2Fthingscoop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agermanidis","download_url":"https://codeload.github.com/agermanidis/thingscoop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agermanidis%2Fthingscoop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260246462,"owners_count":22980395,"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":[],"created_at":"2024-07-31T08:00:57.613Z","updated_at":"2025-06-16T21:39:28.071Z","avatar_url":"https://github.com/agermanidis.png","language":"Python","funding_links":[],"categories":["Models/Projects","模型项目"],"sub_categories":["微信群"],"readme":"\u003cimg width=800 src=\"http://i.imgur.com/gyVNlgX.jpg\"\u003e\u003c/img\u003e\n\n## Thingscoop: Utility for searching and filtering videos based on their content\n\n### Description\n\nThingscoop is a command-line utility for analyzing videos semantically - that means searching, filtering, and describing videos based on objects, places, and other things that appear in them.\n\nWhen you first run thingscoop on a video file, it uses a [convolutional neural network](https://en.wikipedia.org/wiki/Convolutional_neural_network) to create an \"index\" of what's contained in the every second of the input by repeatedly performing image classification on a frame-by-frame basis. Once an index for a video file has been created, you can search (i.e. get the start and end times of the regions in the video matching the query) and filter (i.e. create a [supercut](https://en.wikipedia.org/wiki/Supercut) of the matching regions) the input using arbitrary queries. Thingscoop uses a very basic query language that lets you to compose queries that test for the presence or absence of labels with the logical operators `!` (not), `||` (or) and `\u0026\u0026` (and). For example, to search a video the presence of the sky *and* the absence of the ocean: `thingscoop search 'sky \u0026\u0026 !ocean' \u003cfile\u003e`.\n\nRight now two models are supported by thingscoop: `vgg_imagenet` uses the architecture described in [\"Very Deep Convolutional Networks for Large-Scale Image Recognition\"](http://arxiv.org/abs/1409.1556) to recognize objects from the [ImageNet](http://www.image-net.org/) database, and `googlenet_places` uses the architecture described in [\"Going Deeper with Convolutions\"](http://arxiv.org/abs/1409.4842) to recognize settings and places from the [MIT Places](http://places.csail.mit.edu/) database. You can specify which model you'd like to use by running `thingscoop models use \u003cmodel\u003e`, where `\u003cmodel\u003e` is either `vgg_imagenet` or `googlenet_places`. More models will be added soon.\n\nThingscoop is based on [Caffe](http://caffe.berkeleyvision.org/), an open-source deep learning framework.\n\n### Installation\n\n1. Install ffmpeg, imagemagick, and ghostscript: `brew install ffmpeg imagemagick ghostscript` (Mac OS X) or `apt-get install ffmpeg imagemagick ghostscript` (Ubuntu).\n1. Follow the installation instructions on the [Caffe Installation page](http://caffe.berkeleyvision.org/installation.html). \n2. Make sure you build the Python bindings by running `make pycaffe` (on Caffe's directory).\n3. Set the environment variable CAFFE_ROOT to point to Caffe's directory: `export CAFFE_ROOT=[Caffe's directory]`.\n4. Install thingscoop: `easy_install thingscoop` or `pip install thingscoop`.\n\n### Usage\n\n#### `thingscoop search \u003cquery\u003e \u003cfiles...\u003e`\n\nPrint the start and end times (in seconds) of the regions in `\u003cfiles\u003e` that match `\u003cquery\u003e`. Creates an index for `\u003cfile\u003e` using the current model if it does not exist.\n\nExample output:\n\n```\n$ thingscoop search violin waking_life.mp4\n/Users/anastasis/Downloads/waking_life.mp4 148.000000 162.000000\n/Users/anastasis/Downloads/waking_life.mp4 176.000000 179.000000\n/Users/anastasis/Downloads/waking_life.mp4 180.000000 186.000000\n/Users/anastasis/Downloads/waking_life.mp4 189.000000 190.000000\n/Users/anastasis/Downloads/waking_life.mp4 192.000000 200.000000\n/Users/anastasis/Downloads/waking_life.mp4 211.000000 212.000000\n/Users/anastasis/Downloads/waking_life.mp4 222.000000 223.000000\n/Users/anastasis/Downloads/waking_life.mp4 235.000000 243.000000\n/Users/anastasis/Downloads/waking_life.mp4 247.000000 249.000000\n/Users/anastasis/Downloads/waking_life.mp4 251.000000 253.000000\n/Users/anastasis/Downloads/waking_life.mp4 254.000000 258.000000\n```\n\n####`thingscoop filter \u003cquery\u003e \u003cfiles...\u003e`\n\nGenerate a video compilation of the regions in the `\u003cfiles\u003e` that match `\u003cquery\u003e`. Creates index for `\u003cfile\u003e` using the current model if it does not exist.\n\nExample output:\n\n\u003ca href=\"https://www.youtube.com/watch?v=qe9GjrUJipY\"\u003e\u003cimg width=600 src=\"resources/filter.png\"\u003e\u003c/img\u003e\u003c/a\u003e\n\n#### `thingscoop sort \u003cfile\u003e`\n\nCreate a compilation video showing examples for every label recognized in the video (in alphabetic order). Creates an index for `\u003cfile\u003e` using the current model if it does not exist.\n\nExample output:\n\n\u003ca href=\"https://www.youtube.com/watch?v=o0VoyJgPgJE\"\u003e\u003cimg width=600 src=\"resources/clockwork_orange.png\"\u003e\u003c/img\u003e\u003c/a\u003e\n\n#### `thingscoop describe \u003cfile\u003e`\n\nPrint every label that appears in `\u003cfile\u003e` along with the number of times it appears. Creates an index for `\u003cfile\u003e` using the current model if it does not exist.\n\n#### `thingscoop preview \u003cfile\u003e`\n\nCreate a window that plays the input video `\u003cfile\u003e` while also displaying the labels the model recognizes on every frame.\n\n```\n$ thingscoop describe koyaanisqatsi.mp4 -m googlenet_places\nsky 405\nskyscraper 363\ncanyon 141\noffice_building 130\nhighway 78\nlighthouse 66\nhospital 64\ndesert 59\nshower 49\nvolcano 45\nunderwater 44\nairport_terminal 43\nfountain 39\nrunway 36\nassembly_line 35\naquarium 34\nfire_escape 34\nmusic_studio 32\nbar 28\namusement_park 28\nstage 26\nwheat_field 25\nbutchers_shop 25\nengine_room 24\nslum 20\nbutte 20\nigloo 20\n...etc\n```\n\n#### `thingscoop index \u003cfile\u003e`\n\nCreate an index for `\u003cfile\u003e` using the current model if it does not exist.\n\n#### `thingscoop models list`\n\nList all models currently available in Thingscoop.\n\n```\n$ thingscoop models list\ngooglenet_imagenet            Model described in the paper \"Going Deeper with Convolutions\" trained on the ImageNet database\ngooglenet_places              Model described in the paper \"Going Deeper with Convolutions\" trained on the MIT Places database\nvgg_imagenet                  16-layer model described in the paper \"Return of the Devil in the Details: Delving Deep into Convolutional Nets\" trained on the ImageNet database\n```\n\n#### `thingscoop models info \u003cmodel\u003e`\n\nPrint more detailed information about `\u003cmodel\u003e`.\n\n```\n$ thingscoop models info googlenet_places\nName: googlenet_places\nDescription: Model described in the paper \"Going Deeper with Convolutions\" trained on the MIT Places database\nDataset: MIT Places\n```\n\n#### `thingscoop models freeze`\n\nList all models that have already been downloaded.\n\n```\n$ thingscoop models freeze\ngooglenet_places\nvgg_imagenet\n```\n\n#### `thingscoop models current`\n\nPrint the model that is currently in use.\n\n```\n$ thingscoop models current\ngooglenet_places\n```\n\n#### `thingscoop models use \u003cmodel\u003e`\n\nSet the current model to `\u003cmodel\u003e`. Downloads that model locally if it hasn't been downloaded already.\n\n#### `thingscoop models download \u003cmodel\u003e`\n\nDownload the model `\u003cmodel\u003e` locally.\n\n#### `thingscoop models remove \u003cmodel\u003e`\n\nRemove the model `\u003cmodel\u003e` locally.\n\n#### `thingscoop models clear`\n\nRemove all models stored locally.\n\n#### `thingscoop labels list`\n\nPrint all the labels used by the current model.\n\n```\n$ thingscoop labels list\nabacus\nabaya\nabstraction\nacademic gown\naccessory\naccordion\nacorn\nacorn squash\nacoustic guitar\nact\nactinic radiation\naction\nactivity\nadhesive bandage\nadjudicator\nadministrative district\nadmiral\nadornment\nadventurer\nadvocate\n...\n```\n\n#### `thingscoop labels search \u003cregexp\u003e`\n\nPrint all the labels supported by the current model that match the regular expression `\u003cregexp\u003e`.\n\n```\n$ thingscoop labels search instrument$\nbeating-reed instrument\nbowed stringed instrument\ndouble-reed instrument\nfree-reed instrument\ninstrument\nkeyboard instrument\nmeasuring instrument\nmedical instrument\nmusical instrument\nnavigational instrument\nnegotiable instrument\noptical instrument\npercussion instrument\nscientific instrument\nstringed instrument\nsurveying instrument\nwind instrument\n...\n\n```\n\n### Full usage options\n\n```\nthingscoop - Command-line utility for searching and filtering videos based on their content\n\nUsage:\n  thingscoop filter \u003cquery\u003e \u003cfiles\u003e... [-o \u003coutput_path\u003e] [-m \u003cmodel\u003e] [-s \u003csr\u003e] [-c \u003cmc\u003e] [--recreate-index] [--gpu-mode] [--open]\n  thingscoop search \u003cquery\u003e \u003cfiles\u003e... [-o \u003coutput_path\u003e] [-m \u003cmodel\u003e] [-s \u003csr\u003e] [-c \u003cmc\u003e] [--recreate-index] [--gpu-mode] \n  thingscoop describe \u003cfile\u003e [-n \u003cwords\u003e] [-m \u003cmodel\u003e] [--recreate-index] [--gpu-mode] [-c \u003cmc\u003e]\n  thingscoop index \u003cfiles\u003e [-m \u003cmodel\u003e] [-s \u003csr\u003e] [-c \u003cmc\u003e] [-r \u003cocr\u003e] [--recreate-index] [--gpu-mode] \n  thingscoop sort \u003cfile\u003e [-m \u003cmodel\u003e] [--gpu-mode] [--min-confidence \u003cct\u003e] [--max-section-length \u003cms\u003e] [-i \u003cignore\u003e] [--open]\n  thingscoop preview \u003cfile\u003e [-m \u003cmodel\u003e] [--gpu-mode] [--min-confidence \u003cct\u003e]\n  thingscoop labels list [-m \u003cmodel\u003e]\n  thingscoop labels search \u003cregexp\u003e [-m \u003cmodel\u003e]\n  thingscoop models list\n  thingscoop models info \u003cmodel\u003e\n  thingscoop models freeze\n  thingscoop models current\n  thingscoop models use \u003cmodel\u003e\n  thingscoop models download \u003cmodel\u003e\n  thingscoop models remove \u003cmodel\u003e\n  thingscoop models clear\n\nOptions:\n  --version                       Show version.\n  -h --help                       Show this screen.\n  -o --output \u003cdst\u003e               Output file for supercut\n  -s --sample-rate \u003csr\u003e           How many frames to classify per second (default = 1)\n  -c --min-confidence \u003cmc\u003e        Minimum prediction confidence required to consider a label (default depends on model)\n  -m --model \u003cmodel\u003e              Model to use (use 'thingscoop models list' to see all available models)\n  -n --number-of-words \u003cwords\u003e    Number of words to describe the video with (default = 5)\n  -t --max-section-length \u003cms\u003e    Max number of seconds to show examples of a label in the sorted video (default = 5)\n  -r --min-occurrences \u003cocr\u003e      Minimum number of occurrences of a label in video required for it to be shown in the sorted video (default = 2)\n  -i --ignore-labels \u003clabels\u003e     Labels to ignore when creating the sorted video video\n  --title \u003ctitle\u003e                 Title to show at the beginning of the video (sort mode only)\n  --gpu-mode                      Enable GPU mode\n  --recreate-index                Recreate object index for file if it already exists\n  --open                          Open filtered video after creating it (OS X only)\n```\n\n### CHANGELOG\n\n#### 0.2 (8/16/2015)\n\n* Added `sort` option for creating a video compilation of all labels appearing in a video\n* Now using JSON for the index files\n\n#### 0.1 (8/5/2015)\n\n* Conception\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagermanidis%2Fthingscoop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagermanidis%2Fthingscoop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagermanidis%2Fthingscoop/lists"}