GithubHelp home page GithubHelp logo

rcf-pytorch's Introduction

✨ meteorshowers ✨,                  Blog Badge Mail Badge

  • 🔭 I am working on NN-Planning in XPENG Motors for the next generation Autonomous Driving Platform.
  • 🔭 I used to work with Dr. Xiaozhi Chen on Autonomous Driving 3D perception in DJI (I lead the bevdet team from 0-1).
  • 🌱 I used to work on multi-modal AICG (nlp-cv) work with Shenjian Zhao in ByteDance search-nlp group.

My github stats

Blogs
1. HITNet 谷歌首个高精度实时端到端双目匹配网络结构
2. ActiveStereoNet:谷歌首个基于深度学习的结构光双目匹配系统
3. 推断速度提高几十倍,谷歌研究员提出实时端到端双目系统深度学习网络stereonet

rcf-pytorch's People

Contributors

meteorshowers 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  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  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  avatar

Watchers

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

rcf-pytorch's Issues

About Different Optimizer

Hello, I have paid attention to this work for some time, and appreciate your wonderful work. I have some questions to insult you. And I will appreciate it if you can give some illustrations.

I notice that you also code for Adam optimizer when training. So I wonder if there are some differences between those two kinds of optimizers in performance? Is there anyone better than the other when using the same lr for different layers?

mean_bgr [104.00699, 116.66877, 122.67892]

您好,我看代码“im -= np.array((104.00698793,116.66876762,122.67891434))”,这个是图像RGB的平均值,能否问下,这个平均值好像是Pascal VOC2012的吗?如果对一个新的数据集做边缘检测,是否需要进行同样的统计呢?期待你的回复。谢谢。

Some question about batch_size

thank you for your code. I found the batch_size = 1 in most edge detection code, also in RCF-pytorch, so is it must to set the batch_size = 1, not batch_size > 1 ?

How to extract PASCAL and HED-BSDS and evaluate.py?

I created a data folder and placed the downloaded PASCAL and HED-BSDS tar.gz files in it. Then, I extracted them into folders PASCAL and HED-BSDS. I ran the train_RCF.py and then got errors about missing files, so I then created a new folder named HED-BSDS_PASCAL and placed the HED-BSDS and PASCAL folders in it

After running the training again, it says no such file or directory data/HED-BSDS_PASCAL/HED-BSDS/train/aug_gt_scale_0.5/90.0_1_0/143090.png

I see there is 143090.jpg in there instead. Do I have to change all the png to jpg in bsds_pascal_train_pair.lst?

Also, where is evaluate.py?

vgg16convs.mat ?

hello, I want to know what vgg16convs.mat in your data_loader.py is. Generally, we use a pretrained model, that is a vgg16.pth file. Look forward to your response. Thanks.

wrong kernel size bilinear interpolation on block 5

hi @meteorshowers

Just want to inform you that there is small mistake on your implementation.
File : models.py line : 141

weight_deconv5 = make_bilinear_weights(32, 1).cuda()
Based on the original code
https://github.com/yun-liu/rcf/blob/master/examples/rcf/train_val.prototxt
https://github.com/yun-liu/rcf/blob/master/examples/rcf/test.prototxt

it should be
weight_deconv5 = make_bilinear_weights(16, 1).cuda()

it doesn't matter a lot, but if someone want to use the original pretrained model, it will produce significant different results.

Thank you

请教下 itersize 作用?

迭代10次,更新权重,请问itersize =10, batch size =1 与 itersize =1, batch size =10,有什么区别么?谢谢!

输出图片尺寸不一致

你好,经过你们的预训练模型,推理得到的图片尺寸和原始的不一致
外圈有一层黑边,请问怎么去掉,相关代码在哪里?

Failed to reproduce results

I failed to reproduce the results on the README using your training script.
The scores were

ods: 0.7926  (README says I should get 0.808)
ois: 0.8073   (README says I should get 0.811)

The trained weights can be found here https://drive.google.com/file/d/10N9ohhzJvHdbrYfVd_1zzJ-vp46XEiZN/view?usp=sharing.
The code I used is here https://github.com/yuyu2172/RCF-pytorch.

If possible, could you upload the weights of the trained model you used to produce the results on README?
Also, could you upload VGG16 pretrained weights?

损失很大

我的损失很大,一般都在万以上,这样会不会造成梯度爆炸呢?
我的做法:

1 输入:下载了BSDBS500数据,使用原图和二值图标签训练,使用源代码中的方法,没有归一化输入,只是减每个通道均值
2 中间处理:模型超参数使用代码原始的参数,没有修改,batch 1 iter 10 lr 1-e6
3 输出:损失1w-2w,图相train文件夹里除了第一个有轮廓其他都是黑的或灰的,test文件夹下根本没有轮廓
希望有成功运行的人,能指点一下正确的处理过程,多谢!
1输入
2中间处理
3输出

Can't reproduce the report results

Hello, I used your codes to train the RCF, with no changes to the codes, the best ODS I got is 0.778 with single scale, which is far from the model your uploaded. Moreover, the visualization results still have many texture edges, which is also far beyond your visualized examples. I have tried pytorch1.2 and pytorch0.4.1, but still have the same problems. Have your ever met such problems in your reproduction?

evaluate.py

你好,
感谢你做的贡献,但是我没有在文件夹里面找到evaluate.py,请问可以分享一下吗

Loss值

image
得到如图所示的loss,感觉这个loss降得好快啊,第一次跑训练不太懂是不是哪里搞错了,还是这个原本就是这样,感谢解答。

evaluate.py?

hello,
i can't find the evaluate.py file to test the project, do you know where it is?

also, do you have a pretrained model somewhere?

thanks

Help

/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/nn/_reduction.py:49: UserWarning: size_average and reduce args will be deprecated, please use reduction='none' instead.
warnings.warn(warning.format(ret))
Epoch: [0/30][0/49006] Time 3.022 (avg:3.022) Loss 3202.693115 (avg:3202.693115)
Traceback (most recent call last):
File "train_RCF.py", line 340, in
main()
File "train_RCF.py", line 212, in main
save_dir = join(TMP_DIR, 'epoch-%d-training-record' % epoch))
File "train_RCF.py", line 239, in train
for i, (image, label) in enumerate(train_loader):
File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 637, in next
return self._process_next_batch(batch)
File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ValueError: Traceback (most recent call last):
File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/dongbo/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/dongbo/RCF-pytorch/data_loader.py", line 59, in getitem
img = prepare_image_cv2(img)
File "/home/dongbo/RCF-pytorch/data_loader.py", line 17, in prepare_image_cv2
im -= np.array((104.00698793,116.66876762,122.67891434))
ValueError: non-broadcastable output operand with shape () doesn't match the broadcast shape (3,)

迭代次数设置和加载模型

您好,最近对于RCF算法十分感兴趣,但是由于自身计算机能力较弱因此操作过程中遇到了很多困扰。请问训练模型时迭代次数在哪里能够控制;训练好的模型,应该输入到那个文件用来做边缘检测?

Meaning of "adam1e-4-tunelr"

Thanks for this repo. I am not clear about one thing in result part. What is meaning of "adam1e-4-turnlr" ? If we use adam as the optimizer, do we need to turn learning rate during traning ?

Thanks.

不能复现结果

您好,我用扩充过的BSDS500数据集训练,ODS最高到0.778,请问您训练的时候最大迭代次数和stepsize设置的是多少呢,我用BSDS500加PASCAL数据集训练的时候出来的是全灰的图,不知道是哪里有问题

adddilation-stridewith8

您好,我最近在学习您的RCF-pytorch 代码, 遇到了一点问题:adddilation-stridewith8 是什么意思? 是要将涉及到dilation卷积的步长调整到8? 比如, 在您的 models.py 文件中定义的类 class FlipConv2d(_ConvNd):
def init(self, in_channels, out_channels, kernel_size, stride=1,
padding=0, dilation=1, groups=1, bias=True):
是要将 stride=1 调整为 8。 不知我的理解是否正确? 提前多谢您的指导哈,祝您有一个愉快的中秋。

Question about the RCF edge detection framework.

Thanks for your great work and kind sharing.

I successfully reproduce the edge detection result, as
2018.jpeg:
2018
2018.png:
2018
After NMS process, it turns like:
2018

However, when it switch the normal convolution to some special convolution in the same backbone(VGG16), the result is kinda wacky:
2018
2018

After same NMS process of edge thinning, it turns like more coarser in detail when compared with result above :
2018

Also, after evaluation, the ODS-F is 0.685891 and OIS-F is 0.703985, both are much less than the paper, 0.788864 and 0.806692.

Could any one please point out where is the potential problem lie in, cause I am really confused about it, and have no much experience in edge detection.

Thanks in advance !

training data format

hi!
i wanted to train something with your code and see results
BUT!
i totally don't understand what I need to do with data to run train_RCF.py since there is no instructions in readme
Can you type them, please?

ps as i searched other issues i had information that evaluate.py is still missing ;)

edge results are different for the three channels

Hello, I observed that the content of the three channels of your edge result map (.jpg) is different. I understand that the three channels should be the same because they are all borders. I hope to get your reply. Thank you very much.

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.