{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/zbs-zero-shot-background-subtraction-via","title":"ZBS: Zero-shot Background Subtraction via Instance-level Background Modeling and Foreground Selection","arxiv_id":"2303.14679","date":"2023-03-26","proceeding":"CVPR 2023 1","authors":["Yongqi An","Xu Zhao","Tao Yu","Haiyun Guo","Chaoyang Zhao","Ming Tang","Jinqiao Wang"],"abstract":"Background subtraction (BGS) aims to extract all moving objects in the video frames to obtain binary foreground segmentation masks. Deep learning has been widely used in this field. Compared with supervised-based BGS methods, unsupervised methods have better generalization. However, previous unsupervised deep learning BGS algorithms perform poorly in sophisticated scenarios such as shadows or night lights, and they cannot detect objects outside the pre-defined categories. In this work, we propose an unsupervised BGS algorithm based on zero-shot object detection called Zero-shot Background Subtraction (ZBS). The proposed method fully utilizes the advantages of zero-shot object detection to build the open-vocabulary instance-level background model. Based on it, the foreground can be effectively extracted by comparing the detection results of new frames with the background model. ZBS performs well for sophisticated scenarios, and it has rich and extensible categories. Furthermore, our method can easily generalize to other tasks, such as abandoned object detection in unseen environments. We experimentally show that ZBS surpasses state-of-the-art unsupervised BGS methods by 4.70% F-Measure on the CDnet 2014 dataset. The code is released at https://github.com/CASIA-IVA-Lab/ZBS.","url_abs":"https://arxiv.org/abs/2303.14679v1","url_pdf":"https://arxiv.org/pdf/2303.14679v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"zbs-zero-shot-background-subtraction-via","repo_url":"https://github.com/casia-iva-lab/zbs","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"foreground-segmentation","task_name":"Foreground Segmentation"},{"task_slug":"object","task_name":"Object"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"zero-shot-object-detection","task_name":"Zero-Shot Object Detection"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2303.14679","atlas_url":"https://app.syntology.ai/?focus=2303.14679","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.14679"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/CASIA-IVA-Lab/ZBS","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":5,"ran_honours":1,"ran_violates":1,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"38fac8a2c4b91f17","entry":"convert_bbox_to_z","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"sort_zbs.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/sort_zbs.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"38fac8a2c4b91f17"}},{"code_sha256_prefix":"1f211df98dc51cee","entry":"get_clip_embeddings","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"detic/predictor.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/detic/predictor.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1f211df98dc51cee"}},{"code_sha256_prefix":"bb583e07209fe58b","entry":"get_fed_loss_inds","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"detic/modeling/utils.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/detic/modeling/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bb583e07209fe58b"}},{"code_sha256_prefix":"1c3448b2f86e709f","entry":"iou_batch","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"sort_zbs.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/sort_zbs.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1c3448b2f86e709f"}},{"code_sha256_prefix":"6265d3c1647dda9b","entry":"linear_assignment","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"sort_zbs.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/sort_zbs.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6265d3c1647dda9b"}},{"code_sha256_prefix":"1f6e4c3da7b82979","entry":"load_class_freq","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"detic/modeling/utils.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/detic/modeling/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1f6e4c3da7b82979"}},{"code_sha256_prefix":"c15434906f804d7f","entry":"match_name_keywords","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"detic/custom_solver.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/detic/custom_solver.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c15434906f804d7f"}},{"code_sha256_prefix":"2e0a799ccbd489e7","entry":"compute_average_precision","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"detic/evaluation/oideval.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/detic/evaluation/oideval.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2e0a799ccbd489e7"}},{"code_sha256_prefix":"408481b0831c8f2d","entry":"select_roi","repo":"CASIA-IVA-Lab/ZBS","repo_kind":"official","path":"video_roi.py","file_url":"https://github.com/CASIA-IVA-Lab/ZBS/blob/HEAD/video_roi.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"408481b0831c8f2d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}