Coder Social home page Coder Social logo

jtrack's Introduction

jtrack

Overview

This program will:

  1. Get images from GIPHY API using passed in query
  2. Try and detect faces on them, if found, draw a box
  3. Post results to Slack

I think it's neat because mvn package will actually build the JAR into a Java 12 Docker image (see Dockerfile) that can then be used anywhere. Portability yay!

You should think this is neat because some dependencies are super painful. Like building OpenCV for your platform.

You can also get images from Oracle object storage as well.

Example of face detection:



To Use

1. Configure

  • Create a .env file with GIPHY_TOKEN and SLACK_TOKEN
  • Specify your Docker image in pom.xml under properties (ie <docker.image>carimura/jtrack</docker.image>)

2. Include Dependencies

Only once! (Then each time you change Maven dependencies):

./libs.sh

3. Compile and Build (Includes Docker build)

mvn clean package

4. Profit

docker run -e "QUERY=happy" -e "NUM=3" --env-file=.env <your_docker_name>/jtrack:<version>

Inputs to container:

  • QUERY [string] (ie "excited") -- Query string
  • NUM [int] (ie "5") -- Number of images to pull
  • PREVIEW [bool] (ie "false") -- If set to true, a smaller image will be pulled from Giphy.

To Build

Runtime

You can change the runtime by using jlink as follows:

jlink --no-header-files --no-man-pages --compress=2 --strip-debug \
--module-path /Users/chad/lib/jdk-14-loom-linux.jdk/jmods \
--add-modules java.base,java.compiler,java.desktop,java.instrument,java.management,java.naming,java.sql,jdk.attach,jdk.jdi,jdk.unsupported \
--output java-runtime

TODO

  1. illegal reflective access message for bouncy castle required by OCI stuff

jtrack's People

Contributors

carimura avatar denismakogon avatar

Stargazers

Valentin avatar Lilian BENOIT avatar  avatar Brian Glynn 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.