Code Monkey home page Code Monkey logo

readmeter's Introduction

该存储库为识别指针式仪表,见下图

831

输出结果为归一化后的指针与刻度之间的相对位置。

理论上可已处理多指针多表盘的针表,只需要将不同的指针与刻度分配至不同的通道中即可。

**所有代码和模型都在积极开发中,如有更改或删除,恕不另行通知。**使用风险自负。

讲解

  • 语义分割模型,在不同通道上分割出表盘和指针
  • 环形的表盘展开为矩形图像
  • 二维图像转换为一维数组
  • 对刻度数组用均值滤波
  • 定位指针相对刻度的位置
  • 输出相对位置

语义分割模型采用的是U2Net

要求

安装了所有依赖项的Python 3.8或更高版本,包括torch>=1.7。要安装运行:

环境环境

Meter可以在以下任何经过验证的最新环境中运行(预安装所有依赖项,包括CUDA / CUDNNPythonPyTorch):

训练

运行以下命令以在Data文件夹下的数据集上重现结果。在一台GTX2080TI上。使用--batch-size为您的GPU允许的最大容量(为11 GB设备显示的批量大小)。

$ python train.py

推理

运行read_meter.py可以计算data/文件下的val图片,输出的指针数值为归一化后的数值。

权重

链接: https://pan.baidu.com/s/1wTPo1wJXrNyEFSu8RrD8Xw 密码: t0p4

将文件放置于weight下

readmeter's People

Contributors

ziweizhan avatar

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.