Comments (12)
the pretrained models in dir /result/..
when I run Test_model.py to test the pretrained model,it occur errors.
File "E:/test/ext_portrait_segmentation-master/Test_model.py", line 158, in
lossVal, ElossVal, mIOU_val = val_edge(num_gpu, valLoader, model, criteria, Lovasz)
File "E:\test\ext_portrait_segmentation-master\etc\help_function.py", line 48, in val_edge
epoch_loss.append(loss.item())
UnboundLocalError: local variable 'loss' referenced before assignment
Do you know how to solve it?
from ext_portrait_segmentation.
the pretrained models in dir /result/..
from ext_portrait_segmentation.
yes, the pre-trained file is in result folder
from ext_portrait_segmentation.
😎 the file was too small, I didnot notice it
from ext_portrait_segmentation.
Thanks for great work. The pretrained model's results is not good as in the paper. Is it just a sample pretrained model for testing?
Thank you very much.
from ext_portrait_segmentation.
Could you say more detailed information?
from ext_portrait_segmentation.
@HYOJINPARK I built a test service based on your pretrained model, the results is not good:
from ext_portrait_segmentation.
@HYOJINPARK I tested with
from ext_portrait_segmentation.
Please check this code and result
from ext_portrait_segmentation.
the pretrained models in dir /result/..
when I run Test_model.py to test the pretrained model,it occur errors.
File "E:/test/ext_portrait_segmentation-master/Test_model.py", line 158, in
lossVal, ElossVal, mIOU_val = val_edge(num_gpu, valLoader, model, criteria, Lovasz)
File "E:\test\ext_portrait_segmentation-master\etc\help_function.py", line 48, in val_edge
epoch_loss.append(loss.item())
UnboundLocalError: local variable 'loss' referenced before assignmentDo you know how to solve it?
The following block of code in help_function.py was indented incorrectly:
with torch.no_grad():
input_var, target_var, edge_target_var \
= torch.autograd.Variable(input), torch.autograd.Variable(target), \
torch.autograd.Variable(edge_target)
# run the mdoel
output = model(input_var)
# compute the loss
loss = criterion(output, target_var)
lossE = 0.5*criterion(output, edge_target_var)
It should be at the same level as
if num_gpu > 0:
input = input.cuda()
target = target.cuda()
edge_target = edge_target.cuda()
Not inside that if statement.
from ext_portrait_segmentation.
Thanks for this code
from ext_portrait_segmentation.
Great. Too Small .pth.
from ext_portrait_segmentation.
Related Issues (20)
- the size of input_image HOT 1
- Accuracy issue, implementation difference compared to paper. HOT 4
- visualizing results HOT 4
- The speed about ExtremeC3Net. HOT 1
- Rough edges in mask? HOT 2
- Training new dataset
- main.py HOT 1
- Testing new Image HOT 2
- How to use EG1800
- Error in Visualize_video.py when using result/SINet/SINet.pth HOT 5
- Why is the label of eg1800 data set inconsistent with the number of images? HOT 3
- about test!!! HOT 4
- Converting .pth model to onnx HOT 7
- about inference time
- why ignore_idx==255? in lovasz loss? HOT 2
- Pretrained model output bad segmentation result HOT 4
- trainning new data and test error, help please HOT 3
- Model does not perform well on real world portrait images/videos HOT 1
- groups config setting
- custom dataset training HOT 1
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 ext_portrait_segmentation.