Semantic_Human_Matting
Semantic_Human_Matting copied to clipboard
little problem
I'm sorry when I ran your code it always shows
local variable 'i' referenced before assignment
when it runs to
File "train.py", line 247, in main
loss_ = loss_ / (i+1)
so do you know what's wrong about this place? Thank you~
Is it the lack of space?
'i'
is declared in line 219 and it is not an error in my case. By the way you can replace 'i'
in line 247 with count_of_total_train_items/your_batch_size
because at the end of for loop 'i'
will be the number of batches minus one.
Oh,I see, thank you very much And Is the end result of this program to get a mask of the video?
I have trained this repo for several days with about 20k generated image but the results are not satisfactory. But if it works for one image, you can use it for video too.
Did the trimap for training need to be 3 channels? And the sequence is fg, bg. unsure? When I pretrain the T-net,the groundtruth of the Trimap is [4,1,320,320], but the prediction of the Trimap is [4,3,320,320]. So is the input illegal? or are there something wrong in other places?
Yes, that's OK, 3 is the number of classes. The source code does not have bugs. But the results are poor. I've trained MMNET and got better results.
You are right. the results are not so good. And I'm not sure whether the L_composition without bg works or not and has any effect on the results. but it still is a good work