Comments (8)
- Yes, but you need to change the line
self.data_points = (data_dict['points_'+str(self.sample_vox_size)][:].astype(np.float32)+0.5)/256-0.5
To
self.data_points = (data_dict['points_'+str(self.sample_vox_size)][:].astype(np.float32)+0.5)/self.sample_vox_size-0.5
I haven't tried it myself so let me know if there is a bug.
If you need 256^3 voxels, just use binvox to generate them. You only need to change the shape loader to load binvox files instead of mat files. You can do that using binvox_rw.py:
voxel_model_256 = binvox_rw.read_as_3d_array("example.binvox").data.astype(np.uint8)
Note that you need to make sure the top direction of the shape is pointing Y(j) positive direction. Otherwise, the z-carving in the code does not work.
- You can use image files without alpha channels.
img = cv2.imread("example.png")
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
hdf5_file["pixels"][idx,t,:,:] = img
from im-net-pytorch.
I'm very grateful for your replying.So:
1.If I want to use 256^3 voxel, can I just change command:
binvox -bb -0.5 -0.5 -0.5 0.5 0.5 0.5 -d 64 -e input.obj
to:
binvox -bb -0.5 -0.5 -0.5 0.5 0.5 0.5 -d 256 -e input.obj
2.Considering line 89 in 3_gather_img:
imgo = img[:,:,:3]
which raises error when running code because my png has no alpha channel.How to rewrite this line to get imgo to run line:
img = cv2.cvtColor(imgo, cv2.COLOR_BGR2GRAY)
in your replying?
By the way, Should I use 137x137 png to prepare my training data?
I'm sorry about bothering you again.
Thanks
Zh T
from im-net-pytorch.
-
Yes. Remember to normalize the shapes first. The shape should be zero-centered and the diagonal of the bounding box needs to be 1.
-
Make sure your image has 3 channels and just run cv2.cvtColor(img, cv2.COLOR_BGR2GRAY).
-
The provided code assumes images are 137x137. But during training the images are cropped to 128x128. If you do not want to change the code, use 137x137.
from im-net-pytorch.
Thank you very much,now I have no problem temporarily.
from im-net-pytorch.
It works in training (using 256^3binvox and RGB single view image),thank you very much !
from im-net-pytorch.
Hello, lun22u. I want to ask how to get rendering views images used in https://github.com/czq142857/IM-NET/blob/master/point_sampling/3_gather_img.py? Are they generated from https://github.com/czq142857/IM-NET/blob/master/point_sampling/2_test_hdf5.py?
from im-net-pytorch.
from im-net-pytorch.
Thank you for your reply, lun22u. I have successfully rendered my multi-view images. But there is a problem in normalizing the voxels. Could you tell me how to make the voxel centered and its diagonal of the bounding box to 1.
from im-net-pytorch.
Related Issues (20)
- Code for latent GAN HOT 1
- Reproducing for Point Cloud to Mesh Reconstruction HOT 2
- inconsistency with AE training config and data HOT 2
- Visualizing voxel grid HOT 2
- Question on data preprocessing step HOT 4
- Issues with reconstruction / Discrepancy in metric (CD) HOT 1
- Question on Inference HOT 3
- A concern about the loss function. HOT 6
- training loss keeps increasing for SVR task HOT 2
- About test HOT 8
- About testing HOT 9
- About the original voxel models from HSP HOT 2
- the training code of training font HOT 1
- Training with the ready-to-use data HOT 2
- I can't understand some codes HOT 2
- Have you released the interpolation of 2D Letters? HOT 2
- The issue of infinite loop here HOT 2
- IM-GAN for pytorch version HOT 1
- About the data preprocess 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 im-net-pytorch.