{"id":24727067,"url":"https://github.com/megvii-basedetection/defcn","last_synced_at":"2025-04-06T03:08:12.791Z","repository":{"id":85329507,"uuid":"319247120","full_name":"Megvii-BaseDetection/DeFCN","owner":"Megvii-BaseDetection","description":"End-to-End Object Detection with Fully Convolutional Network","archived":false,"fork":false,"pushed_at":"2022-01-10T06:22:10.000Z","size":799,"stargazers_count":495,"open_issues_count":2,"forks_count":36,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-03-18T06:51:31.908Z","etag":null,"topics":["computer-vision","object-detection"],"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/Megvii-BaseDetection.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":"2020-12-07T08:08:33.000Z","updated_at":"2025-03-06T19:06:46.000Z","dependencies_parsed_at":"2023-03-14T19:15:19.754Z","dependency_job_id":null,"html_url":"https://github.com/Megvii-BaseDetection/DeFCN","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/Megvii-BaseDetection%2FDeFCN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megvii-BaseDetection%2FDeFCN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megvii-BaseDetection%2FDeFCN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megvii-BaseDetection%2FDeFCN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Megvii-BaseDetection","download_url":"https://codeload.github.com/Megvii-BaseDetection/DeFCN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937201,"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":["computer-vision","object-detection"],"created_at":"2025-01-27T14:57:46.495Z","updated_at":"2025-04-06T03:08:12.766Z","avatar_url":"https://github.com/Megvii-BaseDetection.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# End-to-End Object Detection with Fully Convolutional Network\n\n![GitHub](https://img.shields.io/github/license/Megvii-BaseDetection/DeFCN)\n\nThis project provides an implementation for \"[End-to-End Object Detection with Fully Convolutional Network](https://arxiv.org/abs/2012.03544)\" on PyTorch.\n\nExperiments in the paper were conducted on the internal framework, thus we reimplement them on [cvpods](https://github.com/Megvii-BaseDetection/cvpods) and report details as below.\n\n![](./pipeline.png)\n\n## Requirements\n* [cvpods](https://github.com/Megvii-BaseDetection/cvpods)\n* scipy \u003e= 1.5.4\n\n## Get Started\n\n* install cvpods locally (requires cuda to compile)\n```shell\n\npython3 -m pip install 'git+https://github.com/Megvii-BaseDetection/cvpods.git'\n# (add --user if you don't have permission)\n\n# Or, to install it from a local clone:\ngit clone https://github.com/Megvii-BaseDetection/cvpods.git\npython3 -m pip install -e cvpods\n\n# Or,\npip install -r requirements.txt\npython3 setup.py build develop\n```\n\n* prepare datasets\n```shell\ncd /path/to/cvpods\ncd datasets\nln -s /path/to/your/coco/dataset coco\n```\n\n* Train \u0026 Test\n```shell\ngit clone https://github.com/Megvii-BaseDetection/DeFCN.git\ncd DeFCN/playground/detection/coco/poto.res50.fpn.coco.800size.3x_ms  # for example\n\n# Train\npods_train --num-gpus 8\n\n# Test\npods_test --num-gpus 8 \\\n    MODEL.WEIGHTS /path/to/your/save_dir/ckpt.pth # optional\n    OUTPUT_DIR /path/to/your/save_dir # optional\n\n# Multi node training\n## sudo apt install net-tools ifconfig\npods_train --num-gpus 8 --num-machines N --machine-rank 0/1/.../N-1 --dist-url \"tcp://MASTER_IP:port\"\n\n```\n\n## Results on COCO2017 val set\n\n| model | assignment | with NMS | lr sched. | mAP | mAR | download |\n|:------|:----------:|:--------:|:---------:|:---:|:---:|:--------:|\n| [FCOS](./playground/detection/coco/fcos.res50.fpn.coco.800size.3x_ms) | one-to-many | Yes | 3x + ms | 41.4 | 59.1 | [weight](https://drive.google.com/file/d/1j9FmyQQxB2g3J4M7F5DubBtW_7qXHiMv/view?usp=sharing) \\| [log](https://drive.google.com/file/d/18RK2jZd7g198hAeAz80BsD_6cF8aY1mb/view?usp=sharing) |\n| [FCOS baseline](./playground/detection/coco/fcos.res50.fpn.coco.800size.3x_ms.wo_ctrness) | one-to-many | Yes | 3x + ms | 40.9 | 58.4 | [weight](https://drive.google.com/file/d/1diZQFuJQR6XzPXJsyh1zrRuFYjbqKZ9l/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1P1ouRHmSMB4-WZ_yu46lU3kVXlDQAkdE/view?usp=sharing) |\n| [Anchor](./playground/detection/coco/anchor.res50.fpn.coco.800size.3x_ms) | one-to-one | No | 3x + ms | 37.1 | 60.5 | [weight](https://drive.google.com/file/d/1ZVAZPoOlwtNVlxkaKEFWPrkH57nRpuKr/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1CVTcCJvLfPPCDN2rIhk8gX8vp98oQidM/view?usp=sharing) |\n| [Center](./playground/detection/coco/center.res50.fpn.coco.800size.3x_ms) | one-to-one | No | 3x + ms | 35.2 | 61.0 | [weight](https://drive.google.com/file/d/1TgNFHMs9uxjTrMMRTSXarwVWZOkX53av/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1zcnQTQaOXPLLoHy9lHwfFdESxhIkqD1R/view?usp=sharing) |\n| [Foreground Loss](./playground/detection/coco/loss.res50.fpn.coco.800size.3x_ms) | one-to-one | No | 3x + ms | 38.7 | 62.2 | [weight](https://drive.google.com/file/d/1rTsXbEC5Tj8kwXdjTuHYcfoap4TsnkXV/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1EAMPnK7s0TabKKzZhWjALsY1Hege4pFx/view?usp=sharing) |\n| [POTO](./playground/detection/coco/poto.res50.fpn.coco.800size.3x_ms) | one-to-one | No | 3x + ms | 39.2 | 61.7 | [weight](https://drive.google.com/file/d/1mlk5dxc34PyXMajinlF_zWXxs84Z28MH/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1v4TBsbExylfgM7GfGh02vks8AnwSbPDI/view?usp=sharing) |\n| [POTO + 3DMF](./playground/detection/coco/poto.res50.fpn.coco.800size.3x_ms.3dmf) | one-to-one | No | 3x + ms | 40.6 | 61.6 | [weight](https://drive.google.com/file/d/1yUzhK_wtzr4_hqi_WT3YpDryGn_rrltU/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1ik5JnVLIzmuYlbCkq_MTEDrd2jWoNprV/view?usp=sharing) |\n| [POTO + 3DMF + Aux](./playground/detection/coco/poto.res50.fpn.coco.800size.3x_ms.3dmf.aux) | mixture\\* | No | 3x + ms | 41.4 | 61.5 | [weight](https://drive.google.com/file/d/1bxpmTzVzCkV6BHzca_TVWo3pTOEZMAFS/view?usp=sharing) \\| [log](https://drive.google.com/file/d/12LTwMJ3zuBYVa7K0OA0ZRTfC1kxianjW/view?usp=sharing) |\n\n\\* We adopt a one-to-one assignment in POTO and a one-to-many assignment in the auxiliary loss, respectively.\n\n- `2x + ms` schedule is adopted in the paper, but we adopt `3x + ms` schedule here to achieve higher performance.\n- It's normal to observe ~0.3AP noise in POTO.\n\n## Results on CrowdHuman val set\n\n| model | assignment | with NMS | lr sched. | AP50 | mMR | recall | download |\n|:------|:----------:|:--------:|:---------:|:----:|:---:|:------:|:--------:|\n| [FCOS](./playground/detection/crowdhuman/fcos.res50.fpn.crowdhuman.800size.30k) | one-to-many | Yes | 30k iters | 86.1 | 54.9 | 94.2 | [weight](https://drive.google.com/file/d/1qf34m13kniTK2fo2o8etjMfocezSyosQ/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1DgZbvawWGX7rBonS8WgcByIGn7nLNrmA/view?usp=sharing) |\n| [ATSS](./playground/detection/crowdhuman/atss.res50.fpn.crowdhuman.800size.30k) | one-to-many | Yes | 30k iters | 87.2 | 49.7 | 94.0 | [weight](https://drive.google.com/file/d/1J30DVItPgLVg9_ps-NdCXWYqaV0PvwAq/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1jdL2v_A_fhU6GjYBOzT80ps5CZEZBtx5/view?usp=sharing) |\n| [POTO](./playground/detection/crowdhuman/poto.res50.fpn.crowdhuman.800size.30k) | one-to-one | No | 30k iters | 88.5 | 52.2 | 96.3 | [weight](https://drive.google.com/file/d/1mbP0mmHpva30BcQIxY84XhEMsTGwi-ze/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1dmn2ENMkfNXaQUaruSR9Pu1QAAOAhlEC/view?usp=sharing) |\n| [POTO + 3DMF](./playground/detection/crowdhuman/poto.res50.fpn.crowdhuman.800size.30k.3dmf) | one-to-one | No | 30k iters | 88.8 | 51.0 | 96.6 | [weight](https://drive.google.com/file/d/1d_Z6g54RTIVYHzaUrEogmL3gId2PTBSb/view?usp=sharing) \\| [log](https://drive.google.com/file/d/12G-1nm34DjH2xJGRMsiV8OYIZzWooFkt/view?usp=sharing) |\n| [POTO + 3DMF + Aux](./playground/detection/crowdhuman/poto.res50.fpn.crowdhuman.800size.30k.3dmf.aux) | mixture\\* | No | 30k iters | 89.1 | 48.9 | 96.5 | [weight](https://drive.google.com/file/d/1P5uWt4kjQnm-P_WC0MzqLC5TWbIH62UY/view?usp=sharing) \\| [log](https://drive.google.com/file/d/1sTcb5B0vjwSC6QJnwJlLRBJQlVcM2WDl/view?usp=sharing) |\n\n\\* We adopt a one-to-one assignment in POTO and a one-to-many assignment in the auxiliary loss, respectively.\n\n- It's normal to observe ~0.3AP noise in POTO, and ~1.0mMR noise in all methods.\n\n## Ablations on COCO2017 val set\n\n| model | assignment | with NMS | lr sched. | mAP | mAR | note |\n|:------|:----------:|:--------:|:---------:|:---:|:---:|:----:|\n| [POTO](./playground/detection/coco/poto.res50.fpn.coco.800size.6x_ms) | one-to-one | No | 6x + ms | 40.0 | 61.9 | |\n| [POTO](./playground/detection/coco/poto.res50.fpn.coco.800size.9x_ms) | one-to-one | No | 9x + ms | 40.2 | 62.3 | |\n| [POTO](./playground/detection/coco/poto.res50.fpn.coco.800size.3x_ms.argmax) | one-to-one | No | 3x + ms | 39.2 | 61.1 | replace Hungarian algorithm by `argmax` |\n| [POTO + 3DMF](./playground/detection/coco/poto.res50.fpn.coco.800size.3x_ms.3dmf_wo_gn) | one-to-one | No | 3x + ms | 40.9 | 62.0 | remove GN in 3DMF |\n| [POTO + 3DMF + Aux](./playground/detection/coco/poto.res50.fpn.coco.800size.3x_ms.3dmf_wo_gn.aux) | mixture\\* | No | 3x + ms | 41.5 | 61.5 | remove GN in 3DMF |\n\n\\* We adopt a one-to-one assignment in POTO and a one-to-many assignment in the auxiliary loss, respectively.\n\n- For `one-to-one` assignment, more training iters lead to higher performance.\n- The `argmax` (also known as top-1) operation is indeed the approximate solution of bipartite matching in dense prediction methods.\n- It seems harmless to remove GN in 3DMF, which also leads to higher inference speed.\n\n## Acknowledgement\nThis repo is developed based on cvpods. Please check [cvpods](https://github.com/Megvii-BaseDetection/cvpods) for more details and features.\n\n## License\nThis repo is released under the Apache 2.0 license. Please see the LICENSE file for more information.\n\n## Citing\nIf you use this work in your research or wish to refer to the baseline results published here, please use the following BibTeX entries:\n```\n@article{wang2020end,\n  title   =  {End-to-End Object Detection with Fully Convolutional Network},\n  author  =  {Wang, Jianfeng and Song, Lin and Li, Zeming and Sun, Hongbin and Sun, Jian and Zheng, Nanning},\n  journal =  {arXiv preprint arXiv:2012.03544},\n  year    =  {2020}\n}\n```\n\n## Contributing to the project\nAny pull requests or issues about the implementation are welcome. If you have any issue about the library (e.g. installation, environments), please refer to [cvpods](https://github.com/Megvii-BaseDetection/cvpods).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegvii-basedetection%2Fdefcn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegvii-basedetection%2Fdefcn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegvii-basedetection%2Fdefcn/lists"}