Giter VIP home page Giter VIP logo

rubik's Introduction

Rubik

linting: pylint

Rubik is a open-source solution that enables Merchant Center users to improve their offers. It can improve reproved offers or actual ones, with best Merchant Center guidelines. (https://support.google.com/merchants/answer/6101131?hl=en)

How it Works?

Fix Offers

Merchant Center offers can be reproved by a number of factors, Rubik aims to find those factors and fix it. The errors that Rubik aims to solve:

  • Offers reproved by Image
  • Offers reproved by GTIN

Offers reproved by Image

Rubik will select reproved offers and re-inserting them on Merchant Center automatically with different images from the same offer

Rubik Present

Demo with Vision AI

In this demo, Rubik replace the main reproved image with a better image using Vision AI:

Rubik Example

Offers reproved by GTIN

Rubik will clean the offer GTIN, this could lead to another error (Required GTIN) but in most cases that offer will be approved.

How to Use

Sheets Version (Manual)

  1. Copy this Spreadsheet: Rubik - Spreadsheet Version
  2. Read this Documentation: Rubik - Spreadsheet Version Docs
  3. Merchant Center Admin Acess (Account Access -> Users)
  4. If you have any questions, please reach out in Discussions tab

Cloud Version (Automatic)

Prerequisites

  1. Content API - Enabled on GCP (Required) - See: https://developers.google.com/shopping-content/guides/quickstart
  2. Machine with Docker and Python3+ (Required)
  3. Merchant Center Admin Acess (Account Access -> Users), your user need to be MCA admin and with validated status
  4. OAuth Desktop Credentials on GCP, with CLIENT_ID and CLIENT_SECRET (Required)
    • Go to API & Services > OAuth Consent Screen > Mark it as Internal, there is no need to fill other fields
    • Then go to API & Services > Credentials > Create Credentials > OAuth Client ID
      • Application Type: Desktop
      • Name: rubik-desktop (can be anything)
  5. Google Big Query - Enabled (Required)
  6. Google Cloud Storage - Bucket created (Required)
  7. Google Cloud Vision AI - Enabled on your GCP project (Required if you want to use Vision AI) (https://cloud.google.com/vision)

Example

Assuming that you have 100 offers with each offer having 6 images and the main image (first) is reproved.

  1. The rubik_view.sql will find those 100 offers and will rotate the first image of each offer with the second one, so the second one will be the main image

  2. If you don't want to use vision ai it will send all offers with the second offer being the main image. However, if you want to use vision AI it will score all images and choose the best one (from 2 to 6)

  3. The output should be a offer updated with a different image, use the custom_label to see if that image will be approved and displayed into Google Ads.

Test

1 - Prepare the CSV file (follow the sample.CSV) or Bigquery table (follow the sql/rubik_view.sql)

2 - Generate your tokens, the following code should output your Access Token and Secret Access Token to use Merchant Center API:

git clone https://github.com/google/rubik
cd rubik
python3 generate_token.py --client_id <GCP_CLIENT_ID> --client_secret <GCP_CLIENT_SECRET>

3 - Fill rubik.yaml file with your values. If CSV file is informed, it will execute only the CSV file.

4 - Run:

python3.7 main.py rubik.yaml

Deploy

1 - Use the following, don't forget to check if rubik.yaml and your gcp-rubik-project is configured:


docker build --no-cache . -t rubik:latest
docker run --rm rubik:latest

Troubleshooting

Comming Soon

  • Better model for Vision AI
  • Rubik for Kubernetes (daily execution deploy)
  • Version with service account

Questions or Suggestions?

Please use the Discussions tab, we will respond :)

rubik's People

Contributors

guadix avatar roberto-goncalves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

gmh5225

rubik's Issues

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.