{"id":21711950,"url":"https://github.com/hrnet/hrnet-fcos","last_synced_at":"2025-04-12T17:44:10.186Z","repository":{"id":98122325,"uuid":"194215441","full_name":"HRNet/HRNet-FCOS","owner":"HRNet","description":"High-resolution Networks for the Fully Convolutional One-Stage Object Detection (FCOS) algorithm","archived":false,"fork":false,"pushed_at":"2019-10-21T10:59:48.000Z","size":4348,"stargazers_count":125,"open_issues_count":3,"forks_count":37,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-26T12:04:12.855Z","etag":null,"topics":["fcos","hrnets","mscoco","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HRNet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-28T06:00:25.000Z","updated_at":"2024-08-01T14:14:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce3c95c7-0c35-433c-9229-e2caac649a68","html_url":"https://github.com/HRNet/HRNet-FCOS","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/HRNet%2FHRNet-FCOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HRNet%2FHRNet-FCOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HRNet%2FHRNet-FCOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HRNet%2FHRNet-FCOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HRNet","download_url":"https://codeload.github.com/HRNet/HRNet-FCOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248609258,"owners_count":21132879,"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":["fcos","hrnets","mscoco","object-detection"],"created_at":"2024-11-25T23:32:02.937Z","updated_at":"2025-04-12T17:44:10.153Z","avatar_url":"https://github.com/HRNet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# High-resolution Networks for FCOS\n\n## Introduction\nThis project contains the code of HRNet-FCOS, i.e., using [High-resolution Networks (HRNets)](https://arxiv.org/pdf/1904.04514.pdf) as the backbones for the [Fully Convolutional One-Stage Object Detection (FCOS)](https://arxiv.org/abs/1904.01355) algorithm, which achieves much better object detection performance compared with the ResNet-FCOS counterparts while keeping a similar computation complexity. For more projects using HRNets, please go to our [website](https://github.com/HRNet).\n\n## Quick start\n### Installation\n\nPlease check [INSTALL.md](INSTALL.md) for installation instructions.\nYou may also want to see the original [README.md](FCOS_README.md) of FCOS.\n\n### Inference\nThe inference command line on coco minival split:\n\n    python tools/test_net.py \\\n        --config-file configs/fcos/fcos_hrnet_w32_5l_2x.yaml \\\n        MODEL.WEIGHT models/FCOS_hrnet_w32_5l_2x.pth \\\n        TEST.IMS_PER_BATCH 8\n\nPlease note that:\n1) If your model's name is different, please replace `models/FCOS_hrnet_w32_5l_2x.pth` with your own.\n2) If you enounter out-of-memory error, please try to reduce `TEST.IMS_PER_BATCH` to 1.\n3) If you want to evaluate a different model, please change `--config-file` to its config file (in [configs/fcos](configs/fcos)) and `MODEL.WEIGHT` to its weights file.\n\nFor your convenience, we provide the following trained models.\n\nFCOS Model | Training mem (GB) | Multi-scale training | SyncBN| Testing time / im | # params |GFLOPs| AP (minival) | Link\n--- |:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:\nResNet_50_5l_2x           | 29.3 | No  |No | 71ms  |32.0M |190.0| 37.1 | [-]()\nHRNet_W18_5l_2x           | 54.4 | No  |No | 72ms  |17.5M |180.3| 37.7 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqeRND03CfS4HBONM?e=wT0G0O)\nHRNet_W18_5l_2x           | 55.0 | Yes |Yes| 72ms  |17.5M |180.3| 39.4 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqgQlVjkAUDdV9Ej0A?e=9bh7VW)\n||\nResNet_50_6l_2x           | 58.2 | No  |No | 98ms  |32.7M |529.0| 37.1 | [-]()\nHRNet_W18_6l_2x           | 88.1 | No  |No | 106ms |18.1M |515.1| 37.8 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqeumBsKzXzZjE8Qs?e=fT1edk)\n||\nResNet_101_5l_2x          | 44.1 | Yes |No | 74ms  |51.0M |261.2| 41.4 | [model](https://cloudstor.aarnet.edu.au/plus/s/vjL3L0AW7vnhRTo/download)\nHRNet_W32_5l_2x           | 78.9 | Yes |No | 87ms  |37.3M |273.3| 41.9 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqfPuN69wCHx26k0o?e=L7c5FX)\nHRNet_W32_5l_2x           | 80.1 | Yes |Yes| 87ms  |37.3M |273.3| 42.5 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqgQHJWCW0-u0zOgzi?e=yrtKUt)\n||\nResNet_101_6l_2x          | 71.0 | Yes |No | 121ms |51.6M |601.0| 41.5 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqe7UH3Bh-kB8JuKA?e=EF9K0B)\nHRNet_W32_6l_2x           | 108.6| Yes |No | 125ms |37.9M |608.0| 42.1 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqfZn3Xt2CrKUI2rk?e=ZdJSPG)\nHRNet_W32_6l_2x           | 109.9| Yes |Yes| 125ms |37.9M |608.0| 42.9 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqf6I0plglrSXPuys?e=lzdDwu)\n||\nHRNet_W40_6l_3x           | 128.0| Yes |No | 142ms |54.1M |682.9| 42.6 | [model](https://1drv.ms/u/s!Av9x_1oQAAoqfu-2x6aOIsGxSsg?e=OBbs5Z)\n\n[1] *1x, 2x and 3x mean the model is trained for 90K, 180K and 270k iterations, respectively.*\\\n[2] *5l and 6l denote that we use feature pyramid with 5 levels and 6 levels, respectively.*\\\n[3] *We provide model trained with Synchronous Batch Normalization (SyncBN).*\\\n[4] *We report total training memory footprint on all GPUs instead of the memory footprint per GPU as in maskrcnn-benchmark.*\\\n[5] *The inference speed of HRNet can get improved if the branches in the HRNet model can run in parallel.*\\\n[6] *All results are obtained with a single model and without any test time data augmentation.*\n\n### Training\n\nThe following command line will trains a fcos_hrnet_w32_5l_2x model on 8 GPUs with Synchronous Stochastic Gradient Descent (SGD):\n\n    python -m torch.distributed.launch \\\n        --nproc_per_node=8 \\\n        --master_port=$((RANDOM + 10000)) \\\n        tools/train_net.py \\\n        --config-file configs/fcos/fcos_hrnet_w32_5l_2x.yaml \\\n        MODEL.WEIGHT hrnetv2_w32_imagenet_pretrained.pth \\\n        MODEL.SYNCBN False \\\n        DATALOADER.NUM_WORKERS 4 \\\n        OUTPUT_DIR training_dir/fcos_hrnet_w32_5l_2x\n        \nNote that:\n1) If you want to use fewer GPUs, please change `--nproc_per_node` to the number of GPUs. No other settings need to be changed. The total batch size does not depends on `nproc_per_node`. If you want to change the total batch size, please change `SOLVER.IMS_PER_BATCH` in [configs/fcos/fcos_hrnet_w32_5l_2x.yaml](configs/fcos/fcos_hrnet_w32_5l_2x.yaml).\n2) If you want to use Synchronous Batch-Normalization (SyncBN), please change `MODEL.SYNCBN` to `True`. Note that this will lead to ~2x slower training speed when training on mulitple machines. You also need to fix the image padding size when using SyncBN, see [here](maskrcnn_benchmark/structures/image_list.py#L62).\n3) The imagenet pre-trained model can be found [here](https://github.com/HRNet/HRNet-Image-Classification#imagenet-pretrained-models).\n4) The models will be saved into `OUTPUT_DIR`.\n5) If you want to train FCOS on your own dataset, please follow this instruction [#54](https://github.com/tianzhi0549/FCOS/issues/54#issuecomment-497558687).\n### Contributing to the project\n\nAny pull requests or issues are welcome.\n\n### Citations\nPlease consider citing the following papers in your publications if the project helps your research. \n```\n@article{sun2019deep,\n  title={Deep High-Resolution Representation Learning for Human Pose Estimation},\n  author={Sun, Ke and Xiao, Bin and Liu, Dong and Wang, Jingdong},\n  journal={arXiv preprint arXiv:1902.09212},\n  year={2019}\n}\n\n@article{tian2019fcos,\n  title   =  {{FCOS}: Fully Convolutional One-Stage Object Detection},\n  author  =  {Tian, Zhi and Shen, Chunhua and Chen, Hao and He, Tong},\n  journal =  {arXiv preprint arXiv:1904.01355},\n  year    =  {2019}\n}\n```\n\n\n### License\n\nFor academic use, this project is licensed under the 2-clause BSD License - see the LICENSE file for details. For commercial use, please contact the authors. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrnet%2Fhrnet-fcos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrnet%2Fhrnet-fcos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrnet%2Fhrnet-fcos/lists"}