M-LSDを用いて四角形を検出し、射影変換を行うサンプルプログラム

Overview

M-LSD-warpPerspective-Example

M-LSDを用いて四角形を検出し、射影変換を行うサンプルプログラムです。

Requirements

  • OpenCV 3.4.2 or Later
  • tensorflow 2.4.1 or Later

Usage

実行方法は以下です。

python example.py

実行時には、以下のオプションが指定可能です。
  • --device
    カメラデバイス番号の指定
    デフォルト:0
  • --file
    動画ファイルの指定 ※指定時にはカメラデバイスより優先
    デフォルト:None
  • --width
    カメラキャプチャ時の横幅
    デフォルト:640
  • --height
    カメラキャプチャ時の縦幅
    デフォルト:480
  • --crop_width
    射影変換後の画像の横幅
    デフォルト:224
  • --crop_height
    射影変換後の画像の縦幅
    デフォルト:224
  • --model
    モデルパス
    デフォルト:mlsd/tflite_models/M-LSD_320_tiny_fp32.tflite
  • --model_shape
    モデルの入力形状幅
    デフォルト:320
  • --top_n
    検出スコアの高い順にいくつ使用するか
    デフォルト:1
  • --score
    M_LSDパラメータ:score
    デフォルト:0.1
  • --outside_ratio
    M_LSDパラメータ:outside_ratio
    デフォルト:0.1
  • --inside_ratio
    M_LSDパラメータ:inside_ratio
    デフォルト:0.5
  • --w_overlap
    M_LSDパラメータ:w_overlap
    デフォルト:0.0
  • --w_degree
    M_LSDパラメータ:w_degree
    デフォルト:1.14
  • --w_length
    M_LSDパラメータ:w_length
    デフォルト:0.03
  • --w_area
    M_LSDパラメータ:w_area
    デフォルト:1.84
  • --w_center
    M_LSDパラメータ:w_center
    デフォルト:1.46

Reference

推論用プログラム(mlsd/utils.py)、および学習済モデル(mlsd/tflite_models)は、
navervision/mlsdリポジトリのものを使用しています。

Author

高橋かずひと(https://twitter.com/KzhtTkhs)

License

M-LSD-warpPerspective-Example is under Apache v2 license.

Owner
KazuhitoTakahashi
KazuhitoTakahashi
A post-processing tool for scanned sheets of paper.

unpaper Originally written by Jens Gulden — see AUTHORS for more information. Licensed under GNU GPL v2 — see COPYING for more information. Overview u

27 Dec 07, 2022
Make OpenCV camera loops less of a chore by skipping the boilerplate and getting right to the interesting stuff

camloop Forget the boilerplate from OpenCV camera loops and get to coding the interesting stuff Table of Contents Usage Install Quickstart More advanc

Gabriel Lefundes 9 Nov 12, 2021
TedEval: A Fair Evaluation Metric for Scene Text Detectors

TedEval: A Fair Evaluation Metric for Scene Text Detectors Official Python 3 implementation of TedEval | paper | slides Chae Young Lee, Youngmin Baek,

Clova AI Research 167 Nov 20, 2022
Automatic Number Plate Recognition (ANPR) is a highly accurate system capable of reading vehicle number plates without human intervention

ANPR ANPR is therefore the underlying technology used to find a vehicle license/number plate and it, in turn, supplies this information to a next stag

Melih Emin Kılıçoğlu 1 Jan 09, 2022
⛓ marc is a small, but flexible Markov chain generator

About marc (markov chain) is a small, but flexible Markov chain generator. Usage marc is easy to use. To build a MarkovChain pass the object a sequenc

Max Humber 65 Oct 27, 2022
Drowsiness Detection and Alert System

A countless number of people drive on the highway day and night. Taxi drivers, bus drivers, truck drivers, and people traveling long-distance suffer from lack of sleep.

Astitva Veer Garg 4 Aug 01, 2022
huoyijie 1.2k Dec 29, 2022
Papers, Datasets, Algorithms, SOTA for STR. Long-time Maintaining

Scene Text Recognition Recommendations Everythin about Scene Text Recognition SOTA • Papers • Datasets • Code Contents 1. Papers 2. Datasets 2.1 Synth

Deep Learning and Vision Computing Lab, SCUT 197 Jan 05, 2023
(CVPR 2021) ST3D: Self-training for Unsupervised Domain Adaptation on 3D Object Detection

ST3D Code release for the paper ST3D: Self-training for Unsupervised Domain Adaptation on 3D Object Detection, CVPR 2021 Authors: Jihan Yang*, Shaoshu

CVMI Lab 224 Dec 28, 2022
This tool will help you convert your text to handwriting xD

So your teacher asked you to upload written assignments? Hate writing assigments? This tool will help you convert your text to handwriting xD

Saurabh Daware 4.2k Jan 07, 2023
a micro OCR network with 0.07mb params.

MicroOCR a micro OCR network with 0.07mb params. Layer (type) Output Shape Param # Conv2d-1 [-1, 64, 8,

william 29 Aug 06, 2022
Program created with opencv that allows you to automatically count your repetitions on several fitness exercises.

Virtual partner of gym Description Program created with opencv that allows you to automatically count your repetitions on several fitness exercises li

1 Jan 04, 2022
QED-C: The Quantum Economic Development Consortium provides these computer programs and software for use in the fields of quantum science and engineering.

Application-Oriented Performance Benchmarks for Quantum Computing This repository contains a collection of prototypical application- or algorithm-cent

SRI International 67 Nov 30, 2022
Tensorflow-based CNN+LSTM trained with CTC-loss for OCR

Overview This collection demonstrates how to construct and train a deep, bidirectional stacked LSTM using CNN features as input with CTC loss to perfo

Jerod Weinman 489 Dec 21, 2022
Reference Code for AAAI-20 paper "Multi-Stage Self-Supervised Learning for Graph Convolutional Networks on Graphs with Few Labels"

Reference Code for AAAI-20 paper "Multi-Stage Self-Supervised Learning for Graph Convolutional Networks on Graphs with Few Labels" Please refer to htt

Ke Sun 1 Feb 14, 2022
A Vietnamese personal card OCR website built with Django.

Django VietCardOCR Installation Creation of virtual environments is done by executing the command venv: python -m venv venv That will create a new fol

Truong Hoang Thuan 4 Sep 04, 2021
Rubik's Cube in pygame with OpenGL

Rubik Rubik's Cube in pygame with OpenGL The script show on the screen a Rubik Cube buit with OpenGL. Then I have also implemented all the possible mo

Gabro 2 Apr 15, 2022
Convolutional Recurrent Neural Network (CRNN) for image-based sequence recognition.

Convolutional Recurrent Neural Network This software implements the Convolutional Recurrent Neural Network (CRNN), a combination of CNN, RNN and CTC l

Baoguang Shi 2k Dec 31, 2022
Autonomous Driving project for Euro Truck Simulator 2

hope-autonomous-driving Autonomous Driving project for Euro Truck Simulator 2 Video: How is it working ? In this video, the program processes the imag

Umut Görkem Kocabaş 36 Nov 06, 2022
Morphological edge detection or object's boundary detection using erosion and dialation in OpenCV python

Morphologycal-edge-detection-using-erosion-and-dialation the task is to detect object boundary using erosion or dialation . Here, use the kernel or st

Tamzid hasan 3 Nov 25, 2022