Giter Site home page Giter Site logo

ibaigorordo / midasv2_1_small-tflite-inference Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 12.0 7.12 MB

Python scripts to perform monocular depth estimation using Python with the Midas v2.1 small Tensorflow Lite model.

License: MIT License

Python 100.00%
deeplearning midasv2 monocular-depth-estimation python tensorflow tflite

midasv2_1_small-tflite-inference's Introduction

Midas v2.1 small TFLite Inference

Python scripts to perform monocular depth estimation using Python with the Midas v2.1 small Tensorflow Lite model. Tested on Windows 10, Tensorflow 2.4.0 (Python 3.8).

!Midas v2.1 small TFLite Inference

Requirements

  • OpenCV, Numpy and tflite (or tensorflow). pafy and youtube-dl are required for youtube video inference.

Installation

pip install numpy opencv-python tflite tensorflow
pip install pafy youtube-dl

Midas v2.1 small (link)

  • Input: RGB image of size 256 x 256 pixels.
  • Output: Inverse relative depth map with 256 x256 pixels.
  • Inference speed: - 30 FPS on Iphone 11 NPU and 22 FPS on OnePlus8 GPU (Snapdragon 865).

Examples

  • Image inference:
python imageDepthEstimation.py 
  • Webcam inference:
python webcamDepthEstimation.py
  • Video inference:
python videoDepthEstimation.py

!Midas v2.1 small TFLite Inference on video

Original video: https://youtu.be/TGadVbd-C-E (by Nagasaki Biopark)

midasv2_1_small-tflite-inference's People

Contributors

ibaigorordo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

midasv2_1_small-tflite-inference's Issues

dislike count issue

since youtube removed dislikes there seems to be an issue when this part of the code is reached.

line 54, in _fetch_basic
self._dislikes = self._ydl_info['dislike_count']
KeyError: 'dislike_count'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.