{"id":28136990,"url":"https://github.com/res2net/res2net-poolnet","last_synced_at":"2025-10-06T03:55:34.728Z","repository":{"id":182996378,"uuid":"202502581","full_name":"Res2Net/Res2Net-PoolNet","owner":"Res2Net","description":"Res2Net for Salient Object Detection using PoolNet","archived":false,"fork":false,"pushed_at":"2019-10-11T01:41:49.000Z","size":22,"stargazers_count":47,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-14T16:21:52.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mmcheng.net/res2net/","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/Res2Net.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}},"created_at":"2019-08-15T08:21:00.000Z","updated_at":"2025-02-26T07:09:41.000Z","dependencies_parsed_at":"2023-07-22T10:49:01.756Z","dependency_job_id":null,"html_url":"https://github.com/Res2Net/Res2Net-PoolNet","commit_stats":null,"previous_names":["res2net/res2net-poolnet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Res2Net/Res2Net-PoolNet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Res2Net%2FRes2Net-PoolNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Res2Net%2FRes2Net-PoolNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Res2Net%2FRes2Net-PoolNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Res2Net%2FRes2Net-PoolNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Res2Net","download_url":"https://codeload.github.com/Res2Net/Res2Net-PoolNet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Res2Net%2FRes2Net-PoolNet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278556194,"owners_count":26006081,"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-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2025-05-14T16:20:52.504Z","updated_at":"2025-10-06T03:55:34.707Z","avatar_url":"https://github.com/Res2Net.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Res2Net for Salient Object Detection using PoolNet\n\n## Introduction\nThis repo uses [*PoolNet* (cvpr19)](https://arxiv.org/abs/1904.09569) as the baseline method for Salient Object Detection . \n\n[Res2Net](https://github.com/gasvn/Res2Net) is a powerful backbone architecture that can be easily implemented into state-of-the-art models by replacing the bottleneck with Res2Net module.\nMore detail can be found on [ \"Res2Net: A New Multi-scale Backbone Architecture\"](https://arxiv.org/pdf/1904.01169.pdf)\n\n## Performance\n\n### Results on salient object detection datasets **without** joint training with edge. Models are trained using DUTS-TR.\n\n| Backbone     | ECSSD        | PASCAL-S      | DUT-O         | HKU-IS         | SOD             | DUTS-TE        |\n|--------------|--------------|---------------|---------------|----------------|-----------------|----------------|\n|    -         | MaxF \u0026 MAE   | MaxF \u0026 MAE    | MaxF \u0026 MAE    | MaxF \u0026 MAE     | MaxF \u0026 MAE      | MaxF \u0026 MAE     |\n| vgg          |0.936 \u0026 0.047 | 0.857 \u0026 0.078 | 0.817 \u0026 0.058 |  0.928 \u0026 0.035 |   0.859 \u0026 0.115 |  0.876 \u0026 0.043 |\n| resnet50     |0.940 \u0026 0.042 | 0.863 \u0026 0.075 | 0.830 \u0026 0.055 |  0.934 \u0026 0.032 |   0.867 \u0026 0.100 |  0.886 \u0026 0.040 |\n| **res2net50**|0.947 \u0026 0.036 | 0.871 \u0026 0.070 | 0.837 \u0026 0.052 |  0.936 \u0026 0.031 |   0.885 \u0026 0.096 |  0.892 \u0026 0.037 |\n\n\n\n## Evaluation\n\nYou may refer to this repo for results evaluation: [SalMetric](https://github.com/Andrew-Qibin/SalMetric).\n\n## Todo\nWe will merge this repo into the official repo of PoolNet soon.\nWe only modify the normalization of inputs of the PoolNet as follows:\n```\nnormalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],\n                                  std=[0.229, 0.224, 0.225])\n```\n## Usage\n\n### Prerequisites\n\n- [Pytorch 0.4.1+](http://pytorch.org/)\n\n### 1. Clone the repository\n\n```shell\nhttps://github.com/gasvn/Res2Net-PoolNet.git\ncd Res2Net_PoolNet/\n```\n\n### 2. Download the datasets\n\nDownload the following datasets and unzip them into `data` folder.\n\n* [MSRA-B and HKU-IS](https://drive.google.com/open?id=14RA-qr7JxU6iljLv6PbWUCQG0AJsEgmd) dataset. The .lst file for training is `data/msrab_hkuis/msrab_hkuis_train_no_small.lst`.\n* [DUTS](https://drive.google.com/open?id=1immMDAPC9Eb2KCtGi6AdfvXvQJnSkHHo) dataset. The .lst file for training is `data/DUTS/DUTS-TR/train_pair.lst`.\n* [BSDS-PASCAL](https://drive.google.com/open?id=1qx8eyDNAewAAc6hlYHx3B9LXvEGSIqQp) dataset. The .lst file for training is `./data/HED-BSDS_PASCAL/bsds_pascal_train_pair_r_val_r_small.lst`.\n* [Datasets for testing](https://drive.google.com/open?id=1eB-59cMrYnhmMrz7hLWQ7mIssRaD-f4o).\n\n### 3. Download the pre-trained models for backbone\n\nDownload the pretrained models of Res2Net50 from [Res2Net](https://github.com/gasvn/Res2Net) .\nSet the path to pretrain model of Res2Net in `main.py`  (line 55)\n```\nres2net_path = '/home/shgao/.torch/models/res2net50_26w_4s-06e79181.pth'\n```\n### 4. Train\n\n1. Set the `--train_root` and `--train_list` path in `train_res2net.sh` correctly.\n\n2. We demo using Res2Net-50 as network backbone and train with a initial lr of 5e-5 for 24 epoches, which is divided by 10 after 15 epochs.\n```shell\n./train_res2net.sh\n```\n3. We demo joint training with edge using Res2Net-50 as network backbone and train with a initial lr of 5e-5 for 11 epoches, which is divided by 10 after 8 epochs. Each epoch runs for 30000 iters.\n```shell\n./joint_train_res2net.sh\n```\n4. After training the result model will be stored under `results/run-*` folder.\n\n### 5. Test\n\nFor single dataset testing: `*` changes accordingly and `--sal_mode` indicates different datasets (details can be found in `main.py`)\n```shell\npython main.py --mode='test' --model='results/run-*/models/final.pth' --test_fold='results/run-*-sal-e' --sal_mode='e' --arch res2net\n```\nFor all datasets testing used in our paper: `0` indicates the gpu ID to use\n```shell\n./forward.sh 0 main.py results/run-*\n```\nFor joint training, to get salient object detection results use\n```shell\n./forward.sh 0 joint_main.py results/run-*\n```\nto get edge detection results use\n```shell\n./forward_edge.sh 0 joint_main.py results/run-*\n```\n\nAll results saliency maps will be stored under `results/run-*-sal-*` folders in .png formats.\n\n\n### 6. Pre-trained models\n\nThe pretrained models for SOD using Res2Net is now available on [ONEDRIVE](https://1drv.ms/u/s!AkxDDnOtroRPe43-1JjD304ecvU?e=Y7qCHN).\n\nNote：\n\n1. only support `bath_size=1`\n2. Except for the backbone we do not use BN layer.\n\n\n\n\n## Applications\nOther applications such as Classification, Instance segmentation, Object detection, Segmantic segmentation, pose estimation, Class activation map can be found on https://mmcheng.net/res2net/ and https://github.com/gasvn/Res2Net .\n\n## Citation\nIf you find this work or code is helpful in your research, please cite:\n```\n@article{gao2019res2net,\n  title={Res2Net: A New Multi-scale Backbone Architecture},\n  author={Gao, Shang-Hua and Cheng, Ming-Ming and Zhao, Kai and Zhang, Xin-Yu and Yang, Ming-Hsuan and Torr, Philip},\n  journal={IEEE TPAMI},\n  year={2020},\n  doi={10.1109/TPAMI.2019.2938758}, \n}\n@inproceedings{Liu2019PoolSal,\n  title={A Simple Pooling-Based Design for Real-Time Salient Object Detection},\n  author={Jiang-Jiang Liu and Qibin Hou and Ming-Ming Cheng and Jiashi Feng and Jianmin Jiang},\n  booktitle={IEEE CVPR},\n  year={2019},\n}\n```\n## Acknowledge\nThe code for salient object detection is partly borrowed from [A Simple Pooling-Based Design for Real-Time Salient Object Detection](https://github.com/backseason/PoolNet).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fres2net%2Fres2net-poolnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fres2net%2Fres2net-poolnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fres2net%2Fres2net-poolnet/lists"}