Giter Site home page Giter Site logo

javabasedgreenqrhealthcodedetector's Introduction

基于Java的健康码绿码检测


当前版本仅实现澳康码绿码检测


准备工作

  1. 下载Release中的.jar和.zip文件
  2. 将.jar文件Add as library或利用Maven引入工程中
  3. 解压.zip并将解压后的weights文件夹拷贝至工程目录下(示例代码中weights文件夹存放于resources目录下)

示例代码(本地)

  @Test
public void testPredict(){
        // 引入DetectServiceImpl类
        DetectService service=new DetectServiceImpl();
        // 准备传入参数
        UtilInputs input=new UtilInputs();
        input.setClassName("QRCode.names");
        input.setModelName("QRCode.torchscript");
        // 获取模型所在目录路径
        input.setPath(Main.class.getResource("/weights").getPath());
        input.setHeight(640);
        input.setWidth(640);
        // 开始预测
        service.detect(null,input);
        }

示例代码(Web)

  • 参考MacauQRCodeWeb文件夹内SpringBoot项目
  • 请注意${ }表示需要根据实际情况对此处代码作出修改

工程结构

  • project
    • src
      • domain
        • Predict.java
        • UtilInputs.java
        • Bound.java
      • service
        • DetectService
          • impl
            • DetectServiceImpl
      • utils
        • InitializeUtil.java
        • GetBoundUtil.java
    • target
    • weights
      • QRCode.names
      • QRCode.torchscript
    • weights.zip
    • MacauQRCodeWeb

通过自行训练torchscript模型可实现更多额外功能


若使用其他模型可能需要对源代码做出修改


更多功能开发中...

javabasedgreenqrhealthcodedetector's People

Contributors

yemaoluo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.