tomguluson92 / prnet_pytorch Goto Github PK
View Code? Open in Web Editor NEWTraining & Inference Code of PRNet in PyTorch 1.1.0
Training & Inference Code of PRNet in PyTorch 1.1.0
I have trained a model in Pytorch with your code. But I wonder how to transform the Pytorch model to tensorflow one. Cause your code don't have forward code.
I hope you can help me. Thanks a lot.
Hi, I am on reproducing your training code, however I find the model is pretty small(2 MB). I wonder if it's my training data fault or what.
My email : [email protected]
when i run the inference code it shows errors like below
RuntimeError: Error(s) in loading state_dict for ResFCN256:
Missing key(s) in state_dict: "block0.weight", "block1.shortcut_conv.weight"
hope you replay! thanks
PRNet_PyTorch/tools/WLP300dataset.py
Line 53 in 2d30e24
if img_id is not None:
...
or simply just remove if img_id:
The TypeError: cannot unpack non-iterable NoneType object
occurs when the function get_img_path
in PRNetDataset
tries to load img_id == 0
.
When the generate_posmap_300WLP.py
is executed according to README.md, each folder is generated sequentially numbered from folder 0 as described.
However, in python, 0 would be same with False as below:
img_id = 0
if img_id:
print("true")
else:
print("false")
>>> false
Therefore, the function does not return a value, causing the data loader to bug out.
where to download the pytorch1.1.0 version .
after training by all 300WLP datasets. when i evaluate the model. the NME is much lower than the paper. what is the problem?
The following error is output in train.py.
TypeError: pic should be PIL Image or ndarray. Got <class 'torch.Tensor'>
origin, gt_uv_map = transform_img(origin), transform_img(gt_uv_map)
I keep getting errors in this section, how do I fix it?
stat_loss = SSIM(mask_path=FLAGS["mask_path"], gauss=FLAGS["gauss_kernel"])
raise FileNotFoundError("Mask File Not Found! Please Check your Settings!")
FileNotFoundError: Mask File Not Found! Please Check your Settings!
I did not find that "mask_path" is assigned or default. I would like to ask your how to solve the problem.
how can I get depth image, I get only black image
batch,epoch,lr衰减等等怎么设置,我发现batch越大越难收敛,但怎么都收敛不到原论文的精度,请问下你是怎么复现的
Hello,
I am trying to run the landmark detector on a webcam video stream and plot the landmarks but the landmarks are very unstable and almost always far off from what is correct. This is the piece of code that i am running for plotting the landmarks. How can i fix this?
transform_img = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])
prn = PRN("results/latest.pth")
for frame from cam: #psuedo code
frame_temp = cv2.resize(frame[int(bbox[1]*0.7):int(bbox[3]*1.3),int(bbox[0]*0.7):int(bbox[2]*1.3)], (256, 256)) #sending only the face portion of the video stream
image_t = transform_img(frame_temp)
image_t = image_t.unsqueeze(0)
pos = prn.net_forward(image_t.cuda())
out = pos.cpu().detach().numpy()
pos = np.squeeze(out)
cropped_pos = pos * 255
pos = cropped_pos.transpose(1, 2, 0)
kpt = prn.get_landmarks(pos)
cv2.imshow('sparse alignment', plot_kpt(frame_temp, kpt))
cv2.waitKey(10)
I am running this repeatedly over each frame from the web cam.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.