Comments (5)
ValueError:Image of type float must be between -1 and 1
from sc-sfmlearner-release.
It says that the the "imresize" function requires that the image of type float must be between -1 and 1. Here, the image is first loaded in "sequence_floder.py" as float type by
"
def load_as_float(path):
return imread(path).astype(np.float32)
"
Can you try to change it to
"
def load_as_float(path):
return imread(path)
"
and have a try?
from sc-sfmlearner-release.
Or you can try to change the line76 in custom_transforms.py
scaled_images = [imresize(im, (scaled_h, scaled_w)) for im in images]
to
scaled_images = [np.array(Image.fromarray(im.astype(np.uint8)).resize((scaled_w, scaled_h))).astype(np.float32) for im in images]
Also, do not forget add "from PIL import Image" before using Image.fromarray()
from sc-sfmlearner-release.
Hi,
I'm very happy to have received your response.This change worked.
scaled_images = [np.array(Image.fromarray(im.astype(np.uint8)).resize((scaled_w,
scaled_h))).astype(np.float32) for im in images]
In the subsequent training, a problem occurred in inversed_warp.py (typeerror:grid_sample got an
unexpected keyword argument 'align_corners'). Normal training after deletion this.
Thank you.
from sc-sfmlearner-release.
It is due to pytorch version.
"align_corners" is a new keyword in pytorch after 1.4 (or 1.3 that I forgot).
You can update pytorch to the latest version, or you can just delete 'align_corners' in grid_sample function.
from sc-sfmlearner-release.
Related Issues (20)
- about inverse_warp.py HOT 2
- 0.01 in pose decoder HOT 1
- General question (loss to constant 0) HOT 1
- How to use this on a Windows Machine? HOT 3
- Custom Dataset
- NYU V2 HOT 1
- Using mask in training HOT 2
- Stereo datasets needed for training? HOT 1
- pebble missing as a dependency
- unexpected loss curves on my own driving datasets
- About posenet HOT 1
- train only posenet HOT 2
- How to train monodepth2 with the rectified_nyu dataset? HOT 4
- Customized data sets HOT 1
- Pseudo-RGBD SLAM
- monodepth2 added ARN HOT 2
- Mask Visualization HOT 4
- How to Apply the Code to EUROC Dataset?
- About smoothing
- About Auto-Mask
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 sc-sfmlearner-release.