学习LSL:Locate-Globally-Segment-locally

https://github.com/bradleybin/Locate-Globally-Segment-locally-A-Progressive-Architecture-With-Knowledge-Review-Network-for-SOD

code网址

1 身体注意力采样需要安装工具

Install body-atttention sampler related tools (MobulaOP)

# Clone the project
git clone https://github.com/wkcn/MobulaOP

# Enter the directory
cd MobulaOP

# Install MobulaOP
pip install -v -e .

使用时如下 attention_sampler文件夹

主线测试逻辑

1 main_joint.py->

Solver_joint.py

2

1 训练 SGL-KRN

5.1 SGL-KRN

cd demo
python main_SGL_KRN.py

After training, the resulting model will be stored under results/sgl_krn/run-* folder.

 2 训练PA-KRN

5.2 PA-KRN

The whole system can be trained in an end-to-end manner.
To get finer results, we first train CLM and FSM sequentially and then combine them to fine-tune.

整个系统可以端到端的方式进行训练。

为了得到更精确的结果,我们首先依次训练CLM和FSM,然后将它们结合起来进行微调。

cd demo
  1. Train CLM.
python main_clm.py

After training, the resulting model will be stored under results/clm/run-* folder.

  1. Train FSM.
python main_fsm.py  --clm_model path/to/pretrained/clm/folder/

After training, the resulting model will be stored under results/fsm/run-* folder, and * changes accordingly. 'path/to/pretrained/clm/folder/' is the path to pretrained clm folder.

  1. Train PA-KRN.
python main_joint.py  --clm_model path/to/pretrained/clm/folder/  --fsm_model path/to/pretrained/fsm/folder/

After training, the resulting model will be stored under results/joint/run-* folder. 'net_*.pth' is the parameter of CLM model and '.pth' is the parameter of FSM model.

猜你喜欢

转载自blog.csdn.net/zjc910997316/article/details/117562565
lsl