Comments (4)
That's very strange! Are there any errors/warnings printed in the console when you run this?
Also, it should say which device it's using in the terminal, so you can confirm that it's using cpu. It should print out something like:
Initialize
Device: cpu
... some warning about 'meshgrid' ...
Model loaded, number of parameters = <some big number>
Processing input/<name of image> (1/1)
Input resized to <HxW> before entering the encoder
Finished
It's worth double checking that the cpu is being used, and that the image you think you're processing is actually being loaded (and not for example, some hidden/auto-save copy of the image, which could cause problems). Also, it's worth checking if there is any message about something going wrong.
If there isn't some error message, I'd assume that the problem is the model weights, since that's the most obvious way to get nonsense results. So you may want to re-download them and try again. I know the weights on the releases page of this repo work, so if you didn't originally get them from there, that's worth a try.
from midas.
from midas.
That is strange... The run.py script transforms the image prior to processing it with the model, and one of the transformations is a resizing step, to make sure it's properly sized for use in the model. But if it works, it works I guess!
Since manually resizing (especially to 192px) may hurt the quality of the output, it might be worth re-saving your image without any resizing using the same tool that did the resizing and see if that works? It may just be that the original image format isn't supported properly by the midas script, but the format of the resizing tool is supported.
from midas.
Sorry I messed up - it was monodepth2 that worked with the right size image, I never got Midas to work! I'll have another look at your suggestions soon!
from midas.
Related Issues (20)
- module 'cv2.cv2' has no attribute 'COLORMAP_INFERNO'
- What is the loss function?
- Copy of MiDaS model made with `copy.deepcopy` does not work. HOT 1
- swin2_tiny failed to run forward(): RuntimeError: unflatten: Provided sizes [64, 64] don't multiply up to the size of dim 2 (64) in the input tensor. HOT 1
- [question] Any suggestions on normalizing the outputs better? HOT 9
- Error Loading Pre-trained Weights: Size Mismatch in DPTDepthModel when trying to run for first time. HOT 8
- System crash when loading DPT_Hybrid
- PyTorch Pipeline Broken HOT 2
- DPT 3.1 models are now available in the Transformers library HOT 1
- Question about COCO dataset HOT 1
- DEPTH VALUE OF THE EACH PIXEL HOT 12
- iOS Demo app is slowing down over time, and the first inference seems much slower HOT 2
- Converted MiDaS 2.1 TFLite model get wrong result on Mobile HOT 5
- MiDaS 2.1 TFLite fp16 with Core ML Delegate gets wrong results
- Cant find pretrained model HOT 1
- Imp. (Improvement) description in the documents
- Exact distance of image HOT 9
- Can't see output... HOT 1
- New ‘ModuleNotFoundError’ 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 midas.