Comments (2)
Thanks for your interest! The input data is down-sampled 5 times so both the height and width must be integer multiple of 2^5=32. So you could crop the width to 352 pixels or pad it to 384 pixels.
from penet_icra2021.
Thank you for your answer!
I did follow your advice and center crop height down to 352 pixels for both inputs (rgb and depth). As there was still some remaining issues with an error mentioning 'channels', I checked the mode of my color image input and I was indeed in "RGBA". After converting the color image from "RGBA" to "RGB", the code finally worked normally.
from PIL import Image
def crop_center(pil_img, crop_width, crop_height):
img_width, img_height = pil_img.size
return pil_img.crop(((img_width - crop_width) // 2,
(img_height - crop_height) // 2,
(img_width + crop_width) // 2,
(img_height + crop_height) // 2))
def resize_image(image_path):
im = Image.open(image_path)
im_new = crop_center(im, 32*int(im.size[0]/32), 32*int(im.size[1]/32))
if (im_new.mode == 'RGBA'):
im_new = im_new.convert('RGB')
im_new.save(image_path, quality=95)
from penet_icra2021.
Related Issues (20)
- Runtime measurement HOT 4
- How to use the sparse depth?
- How to use the sparse depth? HOT 4
- Modify the backbone network HOT 3
- lightweight deployment of PENet network
- How to infer PENet for KITTI object task? HOT 3
- broken PNG file HOT 1
- the difference intrinsic parameters between train and test HOT 4
- Modify DA-CSPN++ for single branch input HOT 1
- some questions about the implement of CSPN HOT 4
- Model mismatch at inference time HOT 1
- Tensor Dimension Mismatch HOT 1
- How many parameters dose PENet have? HOT 2
- About training HOT 1
- How to implement the model with ROS?
- can't download the pretrained PENet Model
- Pretrained on NYU dataset?
- RuntimeError: CUDA out of memory.
- confindence map
- lower lidar scanline input
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 penet_icra2021.