Giter VIP home page Giter VIP logo

zhengpeng7 / gconet_plus Goto Github PK

View Code? Open in Web Editor NEW
33.0 6.0 5.0 5.59 MB

[TPAMI'23] GCoNet+: A Stronger Group Collaborative Co-Salient Object Detector.

Home Page: https://huggingface.co/spaces/ZhengPeng7/GCoNet_plus_demo

License: MIT License

Python 9.78% Shell 0.12% Jupyter Notebook 90.10%
co-saliency-detection co-salient-object-detection salient-object-detection co-segmentation metric-learning

gconet_plus's People

Contributors

dengpingfan avatar zhengpeng7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gconet_plus's Issues

Why does an epoch stop early and go straight to the next epoch?

Why does an epoch stop early and go straight to the next epoch?
(中文:为什么一个epoch提前停止并直接进入了下一个epoch)
image
I didn't notice this situation when I was training before. Later, it happened when I changed to multi-GPU training. I thought it was a problem with the multi-GPU training I changed, but I re-downloaded the code for single-GPU training and still had this problem:
Each epoch ends early and a new epoch is performed
Is this correct? Or that it was
(中文:之前我训练时并没有注意到有没有出现这个状况,后来我改成多GPU训练时出现了,我以为是改的多GPU训练有问题,可是我重新下了代码单GPU训练还是有这个问题:
每个epoch提前结束,进行新的epoch
这是正确的吗?还是说原本就这样)

与select_results.py相关的问题

image
select_results.py这个文件是用来和别的算法结果比较的吗?之所以报错是不是因为没有别的算法的结果?还是说有其他的地方要调整

一些与sort_results.py和select_resulets.py相关的问题

image
您好,在运行sort_results.py和select_resulets.py时各有一个错误,第二个错误可能是因为第一个引起的,还没有看,对于第一个错误,我看到是来源于130行这句代码
image
其中best_ckpt的值为'gconet_-ep315:',在130行代码中它取了一个空值,错误原因应该是在这
image
请问trail这个变量原本应该是取什么值的?原本以为是取数字,但是后面的ep变量取的是数字315

inference speed 250 fps

Hello, thanks for nice project and you had done solid work.

I have some about the inference time measurement.
I also write script to check the inference time.
while my result is 10 ms per image(100 fps).
It is only inference time, the time of data loading and image resizing are not included.

I am wondering how to make 250 fps.
My hardware are 2080ti GPU and i7 cpu.
Thanks in advance!

simple inference ?

I want to make simple inference for some images I have and the results are bad

from models.GCoNet import GCoNet
import torch
from pathlib import Path
from torchvision.io import read_image
from torchvision.utils import make_grid, save_image
from torchvision import transforms

dataset_path = Path("/path/to/data")

device = torch.device("cuda")
model = GCoNet()
model = model.to(device)
gconet_dict = torch.load("/path/to/weights")
# gconet_dict = torch.load("/shared_volume/rashad/salient_app/ultimate.pth")
trans = transforms.Compose([
            transforms.Resize((320, 320)),
            # transforms.ToTensor(),
            transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
        ])

model.to(device)
model.load_state_dict(gconet_dict)

model.eval()
images = [read_image(str(img_path))[None, ...] for img_path in dataset_path.glob("11/*")]
# print(images)
torch_images = torch.concat(images).float()
torch_images = trans(torch_images)
print(torch_images.shape)
with torch.no_grad():
    result = model(torch_images.cuda())[-1]
    result = torch.concat([torch.nn.functional.interpolate(res.unsqueeze(0), size=(res.shape[1], res.shape[2]), mode='bilinear', align_corners=True) for res in result]).sigmoid()
result = (result > result.mean()).float() * 255
print(result.shape)
print(result.max(), result.min())
save_image(make_grid(result), "salient_example.png")

And this is the result,
salient_example

@HzFu @ZhengPeng7

网络权重

您好,我从您google drive下载的权重包中用 (ultimate_duts_cocoseg (The best one).pth)评估,但和论文中还略微有点差距,且这个权重和(ultimate_duts_cocoseg.pth)应该是同一个,是上传错误了吗?

所提供的代码和训练命令训练时是默认使用了DUTS class和COCO-SEG吗

所提供的代码和训练命令训练时是默认使用了DUTS class和COCO-SEG吗?我看到在参数上只写了DUTS_class
image

CUDA_VISIBLE_DEVICES=0 python train.py --trainset DUTS_class --size ${size} --ckpt_dir ckpt/${method} --epochs ${epochs} --val_dir tmp4val_${method}

但是我在训练脚本里看到的是对两个训练集都遍历了
image
还有他的训练方式是训练一个batch的DUTS,然后一个bach的COCO-SEG,再更新梯度,是这样吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.