pengdaica commited on
Commit
8628ef7
·
verified ·
1 Parent(s): e9caaca

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +90 -0
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - computer-vision
5
+ - saliency-detection
6
+ - poster-generation
7
+ - evaluation
8
+ - isnet
9
+ - basnet
10
+ ---
11
+
12
+ # PosterO Saliency Detection Models
13
+
14
+ This repository contains the saliency detection model weights for the PosterO evaluation pipeline.
15
+
16
+ ## Models Included
17
+
18
+ ### ISNet (isnet-general-use.pth)
19
+ - **Purpose**: High-quality saliency detection
20
+ - **Architecture**: ISNetDIS
21
+ - **Input Size**: 1024×1024
22
+ - **Usage**: Primary saliency map generation
23
+
24
+ ### BASNet (gdi-basnet.pth)
25
+ - **Purpose**: Complementary saliency detection
26
+ - **Architecture**: BASNet
27
+ - **Input Size**: 256×256
28
+ - **Usage**: Secondary saliency map generation
29
+
30
+ ## Usage
31
+
32
+ These models are automatically downloaded and used by the PosterO evaluation script:
33
+
34
+ ```bash
35
+ # Basic usage - models download automatically
36
+ python run_saliency_and_eval_hf.py \
37
+ --input_dir ./images \
38
+ --predictions ./predictions.json \
39
+ --output_dir ./results
40
+
41
+ # Or specify the repository explicitly
42
+ python run_saliency_and_eval_hf.py \
43
+ --input_dir ./images \
44
+ --predictions ./predictions.json \
45
+ --output_dir ./results \
46
+ --hf_isnet_repo "pengdaica/saliency_weights" \
47
+ --hf_basnet_repo "pengdaica/saliency_weights"
48
+ ```
49
+
50
+ ## Evaluation Pipeline
51
+
52
+ The final saliency map used in evaluation is computed as the **element-wise maximum** of both models:
53
+
54
+ ```python
55
+ final_saliency = np.maximum(isnet_map, basnet_map)
56
+ ```
57
+
58
+ This approach leverages the strengths of both architectures:
59
+ - ISNet provides high-resolution, detailed saliency detection
60
+ - BASNet offers complementary detection patterns
61
+ - Maximum operation captures the union of salient regions
62
+
63
+ ## Model Details
64
+
65
+ | Model | File | Size | Resolution | Framework |
66
+ |-------|------|------|------------|-----------|
67
+ | ISNet | `isnet-general-use.pth` | ~168 MB | 1024×1024 | PyTorch |
68
+ | BASNet | `gdi-basnet.pth` | ~332 MB | 256×256 | PyTorch |
69
+
70
+ ## Installation
71
+
72
+ ```bash
73
+ pip install torch torchvision huggingface_hub pillow opencv-python numpy matplotlib cairosvg tqdm
74
+ ```
75
+
76
+ ## Citation
77
+
78
+ If you use these models, please cite the original PosterO paper and the respective saliency detection methods:
79
+
80
+ - ISNet: [Intermediate Supervision Network for Salient Object Detection](https://arxiv.org/abs/2109.12172)
81
+ - BASNet: [Boundary-Aware Segmentation Network for Mobile and Web Applications](https://arxiv.org/abs/2101.04704)
82
+
83
+ ## License
84
+
85
+ Apache 2.0
86
+
87
+ ## Repository
88
+
89
+ - **Code**: [PosterO-CVPR2025](https://github.com/your-repo/PosterO-CVPR2025)
90
+ - **Models**: [pengdaica/saliency_weights](https://huggingface.co/pengdaica/saliency_weights)