New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test custom images with pre-trained model #11
Comments
I still couldn't figure out how to test my own images with the pre-trained model. I would like to input a single image and see what wireframe it predicts. Any hints or help would be appreciated. |
Sorry for missing the issue. Currently testing 3rd images are not supported. If you really want to test it, you need to modify the evaluation script to add a new dataset that includes your images. You need to zero-fill the ground truth entries if they are not available. |
Thanks for your response. So I guess anytime soon, you won't implement it to test 3rd images. So, I will try to modify the script. To zero-fill the ground truth entries: do I just need to use the format of the json files that are accompanied with each image? Or do I need to care about the npz files as well? |
I think you just need to fill the image. All other entries can be zero. You can either modifier the dataloader or provide a new json/npz. If the image intrinsic is know, you can also put it into shapeunity/eval_2d3d_metric.py Line 168 in f04615d
|
Hi @Brakebein may I know if you managed to get the testing on custom images to work? |
Not yet. But that's mainly because I was working on a different part in my project for the last 2 weeks. If this is done, I will continue with this issue (maybe in 2 weeks). If there is any progress in this matter until then, I would be interested as well. |
@Brakebein Any updates on testing on custom images? |
No, sorry. I finally tested their 2D approach (https://github.com/zhou13/lcnn) which was actually sufficient for me. |
您好,我使用自己的数据测试成功了,具体思路为:首先,自己创建一个data/SU1/001文件夹,并在其中存放512*512的自定义png图片,将自定义图片按照0000/0001/0002的格式重命名;其次,将作者提供的数据(SU3)中的其他对应名称的非png图片数据复制粘贴到该文件夹中;最后,直接使用命令“python train.py --eval -d 0 -i default --from logs/pretrained-wireframe/checkpoint_latest.pth.tar logs/pretrained-wireframe/config.yaml”测试结果即可。 |
I have downloaded the pre-trained models and the huge dataset. Running the vectorization & visualization command with the SU3 dataset works. Now, I would like to test some of my own images with the pre-trained model to see how well it works. However, I'm not sure how to do that. How do I have to organize custom images and what command I have to run to evaluate the pre-trained model with these images?
I also tried to run the prediction command with the SU3 dataset.
However, I'm getting the error that it cannot use a CUDA device. My older Nvidia graphics card is not compatible with cudatoolkit 10.x. But it looks like that the pre-trained model has somewhere saying inside that it wants to run things on CUDA, and not fall back on CPU.
Error log
So, my next thought was that I have to train the model by myself on the CPU. So, I need to run the training command:
But there is the next error I cannot resolve. I tried it several times, but it always errors at the same image or data chunk (in the folder that has been created in
logs
, 3 npz files has been generated, and inviz
,000002_img.jpg
has been generated but not the other files (see screenshot)).logs/.../viz/000000600/
Error log
Of course, it would be better to avoid the training process. I just want to test some custom images on your pre-trained model, but it doesn't seem to be trivial. Any help is appreciated.
The text was updated successfully, but these errors were encountered: