Comments (17)
Have you reinstalled FastFCN
by python setup.py install
?
from fastfcn.
Thank you very much.
when i reinstalled python setup.py install ,FastFCN have a error
so ,what is (python setup.py install) function?
from fastfcn.
It did sth like pip install
, which copies all the src code into the directory of python libs.
Then, our script in experiment
can import
the corresponding lib such as encoding
.
Thus, all your modification in the folder encoding
will not work unless you reinstall it.
If you don't want to reinstall every time, just run python setup.py develop
.
from fastfcn.
Thank you very much for your positive response and for providing connection too.Now,I have a question. According to the tips of the paper, I set the following parameter as follow: CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py --dataset ade20k --model encnet --jpu --aux --se-loss --backbone resnet101 --checkname encnet_res101_ade20k_train
but But I can't surface the accuracy of the paper of ade20k (Val and test) .in paper,the val is pixACC:80.99 miou:44.34 in resnet101
Can you tell me how to set the hyperparameters and the accuracy of the paper?
from fastfcn.
Following the instructions in README.md
should lead you to the performance in our paper.
from fastfcn.
`class SegmentationLosses(CrossEntropyLoss):
"""2D Cross Entropy Loss with Auxilary Loss"""
def init(self, se_loss=False, se_weight=0.2, nclass=-1,
aux=False, aux_weight=0.4, weight=None,
size_average=True, ignore_index=-1):
super(SegmentationLosses, self).init(weight, size_average, ignore_index)
self.se_loss = se_loss
self.aux = aux
self.nclass = nclass
self.se_weight = se_weight
self.aux_weight = aux_weight
self.bceloss = BCELoss(weight, size_average)
def forward(self, *inputs):
if not self.se_loss and not self.aux:
return super(SegmentationLosses, self).forward(*inputs)
elif not self.se_loss:
pred1, pred2, target = tuple(inputs)
loss1 = super(SegmentationLosses, self).forward(pred1, target)
loss2 = super(SegmentationLosses, self).forward(pred2, target)
return loss1 + self.aux_weight * loss2
elif not self.aux:
pred, se_pred, target = tuple(inputs)
se_target = self._get_batch_label_vector(target, nclass=self.nclass).type_as(pred)
loss1 = super(SegmentationLosses, self).forward(pred, target)
loss2 = self.bceloss(torch.sigmoid(se_pred), se_target)
return loss1 + self.se_weight * loss2
else:
pred1, se_pred, pred2, target = tuple(inputs)
se_target = self._get_batch_label_vector(target, nclass=self.nclass).type_as(pred1)
loss1 = super(SegmentationLosses, self).forward(pred1, target)
loss2 = super(SegmentationLosses, self).forward(pred2, target)
loss3 = self.bceloss(torch.sigmoid(se_pred), se_target)
return loss1 + self.aux_weight * loss2 + self.se_weight * loss3`
Thank you for your reply.the Se-loss here, I don't know what pred1, pred2 and se_pred are exactly?
I didn't find out exactly where they were generated? I read the paper carefully and found that I did not understand this.Can you tell me what these mean?
from fastfcn.
Please read the EncNet
paper for understanding what SE
loss is. See here for all the outputs.
from fastfcn.
thx for you code. I want to use a module to you code(fastfcn).but my module is in pytorch(0.4.0).I don't know how to change fastfcn apple for pytorch(0.4.0)?Thank you very much for your reply.
from fastfcn.
You can directly plug your module (0.4.0) in FastFCN (1..) without any modification. PyTorch 1.. can run code in 0.4.0 with few changes.
from fastfcn.
Thank you very much for your reply.Because I want to change is the convolution kernel, so you need to use the torch.util.ffi, but the code we wrote this in pytorch 0.4.0 using C language to write, is the use of C + + written in pytorch version 1.0, version can't compatible. I can only give my module into version 1.0, but I'm not familiar with C + + language, so I want to change your code to 0.4.0 version.Could you help me, please?Looking forward to your reply
from fastfcn.
If you only want to use JPU
module, I think no modification is needed. However, if you want to use sync_bn
, there's a huge work to do fot adapting it into 0.4.0
.
from fastfcn.
I want to know what sync_bn is, please?It's different from a regular bn, why do you use sync_bn?
from fastfcn.
bn
calc running_mean
and running_std
per GPU while sync_bn
calc among all GPUs
. Thus, sync_bn
means more stable statics.
from fastfcn.
Hi, I don't see label in dataset pcontext, I would like to ask how the label in dataset pcontext is loaded?I see a trainval_merged. Json file that I don't quite understand.
from fastfcn.
See here.
from fastfcn.
Your work has helped me immensely. I would like to ask, if I want to increase speed, how should I improve it? My current idea is to replace resnet with shufflenetV2, do you have any other suggestions? ,hope to get your reply
from fastfcn.
One simple method is to prune the model.
from fastfcn.
Related Issues (20)
- Pre-training weights HOT 1
- What do I need change in code to run CPU testing without using CUDA
- What do I need change in code to run "test" script only on CPU without using CUDA?
- I can't successfully run train script on my dataset. HOT 1
- "IndexError: list index out of range" durinng "test" and "test single image" scipt HOT 3
- Need your suggestions HOT 5
- FastFCN has been supported by MMSegmentation. HOT 9
- In order to run this on a different dataset say CamVid what changes need to be made HOT 2
- RuntimeError: Failed downloading url https://hangzh.s3.amazonaws.com/encoding/models/resnet50-ebb6acbb.zip HOT 3
- RuntimeError: => no checkpoint found at 'encnet_jpu_res50_pcontext.pth.tar' HOT 1
- Why use seperable convolutions with dilation factor? HOT 1
- Run Time error when trying to train AdeK20 dataset HOT 1
- What batch size and learning rate would you recommend training for a 24gb GPU?
- Runtime error wile downloading pretrained model
- About the PContext precision results HOT 1
- 训练时出现 raise RuntimeError("{} is a zip archive (did you mean to use torch.jit.load()?)". HOT 5
- 不能下载 HOT 2
- about syncbn HOT 3
- latest版本训练的时候卡住 HOT 1
- How could I set "resume" while running test_single_image? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastfcn.