Skip to content

Retail Object Detection pre-trained using EfficientNet

Notifications You must be signed in to change notification settings

dsilverdi/grab-and-go-core

Repository files navigation

Grab and Go Core

Backend Service for Retail Object Detection based on Grab and Go Datesets using Flask

Installation

set up your python environment and use package manager pip to install requirement depedency

pip install -r requirements.txt

then install tensorflow object detection api using our setupapi

chmod +x setupapi.sh
./setupapi.sh

to run the backend service

python app.py

API Endpoints

Predict Object

returns json data about prediction acording to base64 image input

  • URL

    /detection

  • Method:

    POST

  • Request Body

    raw plain text

    data:image/jpeg;base64,/9j/{{base64 encoded image}}
    
  • Success Response:

    • Code: 200
      Content:
      [
          {
              "id": 67784,
              "name": "aqua",
              "price": 12000,
              "quantity": 1
          },
      ]

Payment Checkout

process payment checkout using Midtrans Core-API for e-Wallet

  • URL

    /payment

  • Method:

    POST

  • Request Body

    {
      "order_id":"some-id-test",
      "total":35000,
      "callback_url":"application uri"
    }
  • Success Response:

    • Code: 200
      Content:
      {
        "data": {
            "actions": [
                {
                    "method": "GET",
                    "name": "generate-qr-code",
                    "url": "https://api.sandbox.veritrans.co.id/v2/gopay/57703be5-689c-4b58-bc9a-714026911968/qr-code"
                },
                {
                    "method": "GET",
                    "name": "deeplink-redirect",
                    "url": "https://simulator.sandbox.midtrans.com/gopay/partner/app/payment-pin?id=644fd3ef-7b2d-4e75-a596-813399ddfbc5"
                },
                {
                    "method": "GET",
                    "name": "get-status",
                    "url": "https://api.sandbox.veritrans.co.id/v2/57703be5-689c-4b58-bc9a-714026911968/status"
                },
                {
                    "method": "POST",
                    "name": "cancel",
                    "url": "https://api.sandbox.veritrans.co.id/v2/57703be5-689c-4b58-bc9a-714026911968/cancel"
                }
            ],
            "currency": "IDR",
            "fraud_status": "accept",
            "gross_amount": "35000.00",
            "merchant_id": {{merchant-id}},
            "order_id": "cececece",
            "payment_type": "gopay",
            "status_code": "201",
            "status_message": "GoPay transaction is created",
            "transaction_id": {{transaction-id}},
            "transaction_status": "pending",
            "transaction_time": "2021-06-09 21:20:43"
        },
        "message": "payment success"
      }

About

Retail Object Detection pre-trained using EfficientNet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published