Closed ngoanpv closed 3 years ago
Not reproduced. The testing is OK for me. Could you please provide a script for reproducing the error?
I follow the demo on Google Colab link from this repo with my image. Here is the picture I test: https://github.com/ngoanpv/3DDFA_V2/raw/master/docs/images/IMG_0852.JPG I run this code:
# reconstruct vertices and render
ver_lst = tddfa.recon_vers(param_lst, roi_box_lst, dense_flag=dense_flag)
render(img, ver_lst, tddfa.tri, alpha=0.6, show_flag=True, with_bg_flag=False);
the error is as bellow
I use your tested image, and modify with_bg_flag
to False in below code,
https://github.com/cleardusk/3DDFA_V2/blob/b7558fac95366e91de41cffaa17a10273e35d199/demo.py#L72
then, I run
python3 demo.py -f examples/inputs/IMG_0852.JPG -o depth
The running is without error and the result is below:
I think the problem from the Colab environment, not the bug on this repo. I close this pull request now. Thank you for your time.
Anyone, thanks for your warmth on this repo : )
Hi author,
When I render without background on
depth.py
andrender.py
, the NumPy array without contiguous will make an error as bellowValueError: ndarray is not C-contiguous
So I change the zeros array to a contiguous array by using
np.ascontiguousarray
overlap = np.ascontiguousarray(np.zeros_like(img))