{"id":24520419,"url":"https://github.com/mit-han-lab/viscompare","last_synced_at":"2025-07-22T04:31:34.443Z","repository":{"id":272878744,"uuid":"918041720","full_name":"mit-han-lab/VisCompare","owner":"mit-han-lab","description":"A WebUI for Side-by-Side Comparison of Media (Images/Videos) Across Multiple Folders","archived":false,"fork":false,"pushed_at":"2025-02-21T06:24:26.000Z","size":18395,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-14T10:50:05.108Z","etag":null,"topics":["diffusion-models","generative-ai","images","python","streamlit","ui","video","webui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mit-han-lab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-17T06:14:14.000Z","updated_at":"2025-04-04T04:25:42.000Z","dependencies_parsed_at":"2025-04-14T10:43:08.132Z","dependency_job_id":"7b3d2d5c-36fc-47f2-9a43-354e2e11b857","html_url":"https://github.com/mit-han-lab/VisCompare","commit_stats":null,"previous_names":["mit-han-lab/viscompare"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mit-han-lab/VisCompare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-han-lab%2FVisCompare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-han-lab%2FVisCompare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-han-lab%2FVisCompare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-han-lab%2FVisCompare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mit-han-lab","download_url":"https://codeload.github.com/mit-han-lab/VisCompare/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-han-lab%2FVisCompare/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266427720,"owners_count":23926853,"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":["diffusion-models","generative-ai","images","python","streamlit","ui","video","webui"],"created_at":"2025-01-22T02:22:33.848Z","updated_at":"2025-07-22T04:31:34.418Z","avatar_url":"https://github.com/mit-han-lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VisCompare\n\n**VisCompare** is a WebUI application powered by [Streamlit](https://streamlit.io/) for side-by-side comparison of visual media from different folders.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/demo.gif\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n## Installation\n\nEnsure you are using Python 3 to run this application. Then, install the required dependencies with the following command:\n```shell\npip install streamlit streamlit-extras streamlit-sortables streamlit-file-browser\n```\n\n## Usage\n\n### Local Deployment\nTo run the application locally, use the following command:\n```shell\nstreamlit run main.py\n```\nYou can execute this command in any working directory by adjusting the path to `main.py` as needed. Once the application is running, open a web browser and navigate to the provided URL and port. By default, the application should be accessible at http://localhost:8501.\n\n### Remote Deployment\nTo deploy the application remotely, first follow the steps outlined in the local deployment section to start the application on your remote server. After that, establish an SSH tunnel to map the remote server's port to your local machine. Use the following command:\n```shell\nssh -N -L $LOCAL_PORT:localhost:$REMOTE_PORT -o ServerAliveCountMax=3 -o ServerAliveInterval=15 -o ExitOnForwardFailure=yes -p $LOGIN_PORT $USERNAME@$SERVER_ADDRESS\n```\nReplace the placeholders (`$LOCAL_PORT`, `$REMOTE_PORT`, `$LOGIN_PORT`, `$USERNAME`, and `$SERVER_ADDRESS`) with the appropriate values for your setup. In most cases, if you are using a VS Code server, the setup for port forwarding will be handled automatically. Once the SSH tunnel is established, you can open your browser, navigate to the specified local port, and use the application.\n\n## Features\n\n### Folders and Display Names\n\nTo compare images or videos, enter the folder paths into the input fields. You can use either relative paths (from your current directory) or absolute paths. After clicking **Compare**, you’ll be navigated to the comparison page, where files with the same names (without suffix) across all specified folders will be displayed in a row. Only files common to all folders will be shown.\n\nEach folder path can be assigned a display name corresponding to the **Display Name** field, which serves as the column header. If left blank, a default name like \"Folder $i$\" (where $i$ represents the row index) will be used. You can reorder the folders by clicking the **Reorder** button and dragging the folder items into your desired order.\n\nTo randomize the display order of media files, use the **Random Seed** option. If its value is set to -1, the media files are displayed in alphabetical order.\n\n### Captions\n\nTo add captions, place your caption files in the `captions` folder in YAML format. The YAML file should follow this structure:\n```yaml\nfilename1: prompt1\nfilename2: prompt2\nfilename3: prompt3\n```\nHere, `filename` refers to the media file name without the file extension. For an example, refer to [example.yaml](captions/example.yaml). Once added, your caption file will appear as an option under **Path to the Caption File**.\n\n### Save and Load\nYou can save the application's current state by clicking the **Save** button and entering a save path. The state is saved as a YAML file in the `configs` folder. To load a saved state, click the **Load** button and select the desired file path.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-han-lab%2Fviscompare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmit-han-lab%2Fviscompare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-han-lab%2Fviscompare/lists"}