{"id":19370255,"url":"https://github.com/bgu-cs-vil/deepmcbm","last_synced_at":"2025-04-23T15:32:12.505Z","repository":{"id":46330399,"uuid":"512243929","full_name":"BGU-CS-VIL/DeepMCBM","owner":"BGU-CS-VIL","description":"\"A Deep Moving-camera Background Model\" [Erez, Shapira Weber, and Freifeld, ECCV 2022]","archived":false,"fork":false,"pushed_at":"2023-08-19T10:31:30.000Z","size":50383,"stargazers_count":45,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-02T17:11:18.002Z","etag":null,"topics":["background-estimation","computer-vision","deep-learning","moving-camera","pytorch"],"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/BGU-CS-VIL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-09T17:17:36.000Z","updated_at":"2025-01-13T13:13:05.000Z","dependencies_parsed_at":"2023-01-20T08:46:23.402Z","dependency_job_id":null,"html_url":"https://github.com/BGU-CS-VIL/DeepMCBM","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/BGU-CS-VIL%2FDeepMCBM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGU-CS-VIL%2FDeepMCBM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGU-CS-VIL%2FDeepMCBM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGU-CS-VIL%2FDeepMCBM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BGU-CS-VIL","download_url":"https://codeload.github.com/BGU-CS-VIL/DeepMCBM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250460553,"owners_count":21434264,"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":["background-estimation","computer-vision","deep-learning","moving-camera","pytorch"],"created_at":"2024-11-10T08:14:44.307Z","updated_at":"2025-04-23T15:32:08.800Z","avatar_url":"https://github.com/BGU-CS-VIL.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepMCBM\n\n**Authors:** Guy Erez, Ron Shapira Weber, and Oren Freifeld.\n\nThis code repository corresponds to our ECCV '22 paper: [**DeepMCBM: A Deep Moving-camera Background Model**](https://arxiv.org/abs/2209.07923).\nDeepMCBM is a novel 2D-based method for unsupervised learning of a moving-camera background model, which is highly scalable and allows for relatively-free camera motion.\n\n##### Table of Contents  \n1. [Documentation](#Documentation)\n   * [Environment](#Environment)\n   * [Train, Predict and Evaluate](#Train-Predict-and-Evaluate)\n   * [Input, Output and Checkpoints](#Input,-Output-and-Checkpoints)\n   * [Predict a Pretrained Model](#Predict-a-Pretrained-Model)\n1. [Results](#Results)\n3. [Visual Comparisons](#Visual-Comparisons)\n\n\n\n# Documentation   \n \n \u003cimg src = \"https://github.com/BGU-CS-VIL/DeepMCBM/blob/main/imgs/pipeline.png?raw=true\" width=900\u003e\n\n## Environment\nThe repository is equipped with a DeepMCBM_env.yml file.  \nRun conda env create -f DeepMCBM_env.yml from your terminal to set a conda environment using this file.     \nTo ensure the environment is set properly, activate the new environment and run a \"dry run\" with few epochs:\n```\nconda activate DeepMCBM\npython src/DeepMCBM.py --DryRun\n```\n## Train, Predict and Evaluate  \nTo train, predict and evaluate a deepMCBM module on the default tennis sequence:\n```\npython src/DeepMCBM.py \n```\n## Input, Output and Checkpoints \nThe default values for the input, output, and checkpoints paths are set in ```src/args.py``` and can be changed to any path you wish. The requirement for the input directory is to have the following subdirectories: \"frames\" include the sequence frames, and if ground truth labels are available, a \"GT\" directory containing the ground truth frames. See the input/tennis for an example. The output directories are named by the sequence and the ```log_name``` argument: ```output/sequence_name/log_name``` in this directory you will find:\n- background_estimation directory containing the background estimation of the model.  \n- MSE directory containing the Mean Square Error (MSE) computed using the ground truth labels. \n- panoramic_robust_mean.png image, shows the alignment result of the STN module.\n\nYou can change the log_name simply by adding ```log_name \"my_new_name\"``` to your command line.   \n\n## Predict Using a Pretrained Model\nTo only predict and evaluate metrics:\n```\npython src/DeepMCBM.py --no_train_BMN --no_train_STN \n```\nYou can change the loaded checkpoint using a flag: \n```\npython src/DeepMCBM.py --no_train_BMN --no_train_STN --BMN_ckpt ckpt_file.ckpt  \n```\nOr by editing the MCBM_CKPT argument in src/args.py  \n\nNote: when using a pretrained model, the argument --pad, describing the size of the padding, must be the same as in the training phase.\n\n# Results\n\nhttps://user-images.githubusercontent.com/6692232/180310568-def4a578-091e-4a51-98c7-036e3f76f1cc.mp4\n\nhttps://user-images.githubusercontent.com/6692232/180310715-9ba0d7c1-7075-476f-98e9-a964b56beadf.mp4\n\nhttps://user-images.githubusercontent.com/6692232/180310721-69e822fb-89e4-46d4-89ac-fb1d9a7fc6b4.mp4\n\nhttps://user-images.githubusercontent.com/6692232/180310726-bbb9a9ed-60fd-4774-8e27-22bbec92db9b.mp4\n\nhttps://user-images.githubusercontent.com/6692232/180310729-1aafeeb5-36fa-4622-85aa-96e14c26c245.mp4\n\nhttps://user-images.githubusercontent.com/6692232/180310734-79522a80-47ab-4391-8339-927953fdf779.mp4\n\nhttps://user-images.githubusercontent.com/6692232/180310703-9390b353-37eb-41ca-802f-7ba4ffa42abd.mp4\n\n# Visual Comparisons \n[tennis.pdf](https://github.com/BGU-CS-VIL/DeepMCBM/files/9315725/tennis.pdf)\n\n[flamingo.pdf](https://github.com/BGU-CS-VIL/DeepMCBM/files/9315795/flamingo.pdf)\n\n[dog-gooses.pdf](https://github.com/BGU-CS-VIL/DeepMCBM/files/9315794/dog-gooses.pdf)\n\n[bmx-trees.pdf](https://github.com/BGU-CS-VIL/DeepMCBM/files/9315796/bmx-trees.pdf)\n\n[horsejump-high.pdf](https://github.com/BGU-CS-VIL/DeepMCBM/files/9315798/horsejump-high.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgu-cs-vil%2Fdeepmcbm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgu-cs-vil%2Fdeepmcbm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgu-cs-vil%2Fdeepmcbm/lists"}