{"id":16272149,"url":"https://github.com/progamergov/pytorch-convis","last_synced_at":"2025-03-19T23:31:02.061Z","repository":{"id":103796557,"uuid":"129476551","full_name":"ProGamerGov/pytorch-convis","owner":"ProGamerGov","description":"A tool to visualize convolutional layer activations on an input image.","archived":false,"fork":false,"pushed_at":"2019-10-23T23:42:35.000Z","size":1353,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T12:11:40.559Z","etag":null,"topics":["cnn","convis","heatmap","machine-learning","network-in-network","neural-style-pt","nin","pytorch","vgg","vision","visualisation","visualization"],"latest_commit_sha":null,"homepage":null,"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/ProGamerGov.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,"publiccode":null,"codemeta":null}},"created_at":"2018-04-14T03:11:40.000Z","updated_at":"2022-06-04T18:06:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"513230dd-4616-4c4c-808d-4d1fb68363a1","html_url":"https://github.com/ProGamerGov/pytorch-convis","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/ProGamerGov%2Fpytorch-convis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProGamerGov%2Fpytorch-convis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProGamerGov%2Fpytorch-convis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProGamerGov%2Fpytorch-convis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProGamerGov","download_url":"https://codeload.github.com/ProGamerGov/pytorch-convis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244524771,"owners_count":20466500,"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":["cnn","convis","heatmap","machine-learning","network-in-network","neural-style-pt","nin","pytorch","vgg","vision","visualisation","visualization"],"created_at":"2024-10-10T18:16:27.259Z","updated_at":"2025-03-19T23:31:02.056Z","avatar_url":"https://github.com/ProGamerGov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# convis\nA tool to visualize convolutional, ReLU, and pooling layer activations on an input image. This is a PyTorch implementation of [htoyryla](https://github.com/htoyryla)'s [convis](https://github.com/htoyryla/convis).\n\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/ProGamerGov/pytorch-convis/master/examples/output/tubingen-conv3_2-16.jpg\" height=\"250px\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/ProGamerGov/pytorch-convis/master/examples/output/tubingen_vgg19_relu4_2_heatmap.jpg\" height=\"250px\"\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003eAn output image from a single channel (left), and a layer heatmap (right):\u003c/div\u003e\n\n### Dependencies:\n\n* [PyTorch](http://pytorch.org/)\n\n### Setup: \n\nAfter installing the dependencies, you'll need to run the following script to download the default VGG and NIN models:\n\n```\npython models/download_models.py\n```\n\nYou can also place `convis.py` or `convis_heatmap.py` in your [neural-style-pt](https://github.com/ProGamerGov/neural-style-pt) directory, in order to more easily work with models and input images. \n\n### Usage:\n\n`convis.py` will create an output image for every channel in the specified layer:\n\n```\npython convis.py -input_image examples/inputs/tubingen.jpg -model_file models/vgg19-d01eb7cb.pth -layer conv2_2 -output_dir output\n```\n\n`convis_heatmap.py` will create a single output image composed of every channel in the specified layer:\n\n```\npython convis_heatmap.py -input_image examples/inputs/tubingen.jpg -model_file models/vgg19-d01eb7cb.pth -layer relu4_2\n```\n \n### Parameters:\n\n* `-input_image`: Path to the input image.\n* `-image_size`: Maximum side length (in pixels) of the generated image. Default is 512.\n* `-layer`: The target layer. Default is `relu4_2`\n* `-pooling`: The type of pooling layers to use; one of `max` or `avg`. Default is `max`.\n* `-model_file`: Path to the `.pth` file for the VGG or NIN model.\n* `-output_image`: Name of the output image. Default is `out.png`.\n* `-output_dir`: Name of the output image directory. Default is `output`.\n\nThe output files will be named like `output/tubingen-conv3_2-69.png`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogamergov%2Fpytorch-convis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogamergov%2Fpytorch-convis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogamergov%2Fpytorch-convis/lists"}