Comments (9)
I wonder if the blank space inside could be a 3D model?
from im-net-pytorch.
It may be due to the cropping in line 222 of modelSVR.py
self.data_pixels = np.reshape(data_dict['pixels'][:,:,offset_y:offset_y+self.crop_size, offset_x:offset_x+self.crop_size], [-1,self.view_num,1,self.crop_size,self.crop_size])
Basically, this part center-crops the 137^2 input image into a 128^2 image. It was originally designed for random-cropping as a data augmentation process, but was later removed. Now it is just center-cropping.
Please do the same thing for your input image, if you are using rendered views from 3D-R2N2.
Also, please make sure your input image has white background. You need to handle the alpha channel carefully.
from im-net-pytorch.
It may be due to the cropping in line 222 of modelSVR.py
self.data_pixels = np.reshape(data_dict['pixels'][:,:,offset_y:offset_y+self.crop_size, offset_x:offset_x+self.crop_size], [-1,self.view_num,1,self.crop_size,self.crop_size])
Basically, this part center-crops the 137^2 input image into a 128^2 image. It was originally designed for random-cropping as a data augmentation process, but was later removed. Now it is just center-cropping.
Please do the same thing for your input image, if you are using rendered views from 3D-R2N2.
Also, please make sure your input image has white background. You need to handle the alpha channel carefully.
Thank you,I have read the test_image
code, its contains the suggestions you mentioned,however,it does not work.
Aha,I want to use your code as a refiner for small objects in an indoor reconstruction project.I tried to modify the test_image
code,Can you give me some advice.
from im-net-pytorch.
test_image does not center-crop the image.
You can view a few example input images of the training data from the provided hdf5 file. If your images are similar to those training images, then the model should work.
Anyway, you could always re-train the model with your own data to make it work, and perform data augmentation to make it robust.
from im-net-pytorch.
test_image does not center-crop the image.
You can view a few example input images of the training data from the provided hdf5 file. If your images are similar to those training images, then the model should work.
Anyway, you could always re-train the model with your own data to make it work, and perform data augmentation to make it robust.
I'm sorry for replying you so long, but I still can't understand what you mean. I found a center-crop in the test_image
code, and I have a rendered views(137*137) from 3D-R2N2. May I ask what I need to do to reconstruction it.
from im-net-pytorch.
Please read the code carefully. There is no center-crop in test_image. You need to add center-crop to the code if your views are from 3D-R2N2.
from im-net-pytorch.
Please read the code carefully. There is no center-crop in test_image. You need to add center-crop to the code if your views are from 3D-R2N2.
imgo_ = cv2.imread(img_add, cv2.IMREAD_GRAYSCALE)
imgo_=imgo_[4:133,4:133]
batch_view_ = cv2.resize(imgo_, (self.crop_size,self.crop_size)).astype(np.float32)/255.0
batch_view_ = np.reshape(batch_view_, [1,1,self.crop_size,self.crop_size])
I've modified the code, but it's still not good, and I'm using rendered views(137*137) from 3D-R2N2
from im-net-pytorch.
Also, please make sure your input image has white background. You need to handle the alpha channel carefully.
It seems you forgot to handle the alpha channel.
Please use the code below.
img = cv2.imread(img_add, cv2.IMREAD_UNCHANGED)
imgo = img[:,:,:3]
imgo = cv2.cvtColor(imgo, cv2.COLOR_BGR2GRAY)
imga = (img[:,:,3])/255.0
img = imgo*imga + 255*(1-imga)
img = np.round(img).astype(np.uint8)
offset_x = int(self.crop_edge/2)
offset_y = int(self.crop_edge/2)
img = img[offset_y:offset_y+self.crop_size, offset_x:offset_x+self.crop_size]
batch_view_ = cv2.resize(img, (self.crop_size,self.crop_size)).astype(np.float32)/255.0
batch_view_ = np.reshape(batch_view_, [1,1,self.crop_size,self.crop_size])
from im-net-pytorch.
batch_view_ = cv2.resize(img, (self.crop_size,self.crop_size)).astype(np.float32)/255.0 batch_view_ = np.reshape(batch_view_, [1,1,self.crop_size,self.crop_size])
It works, thank you very much!!!!!!!!
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 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
- Train imnet using other data HOT 8
- 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.