Skip to content

Commit

Permalink
Merge pull request #10 from amirandalibi/dependency-update
Browse files Browse the repository at this point in the history
Update dependencies to fix security vulnerability in "google/protobuf"
  • Loading branch information
amirandalibi committed Feb 12, 2022
2 parents 3977df5 + f560956 commit 9cf0d31
Show file tree
Hide file tree
Showing 11 changed files with 835 additions and 479 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ help:
@echo ""
@echo "---------------------------------"
@echo ""

start:
./scripts/start.sh

build:
docker-compose up -d --build

install:
docker exec -it $$(docker ps -aqf "name=perception_wp") /bin/bash -c "cd wp-content/plugins/perception && composer install --no-suggest --no-scripts"
docker exec -it $$(docker ps -aqf "name=perception_wp") /bin/bash -c "cd wp-content/plugins/perception && composer install --no-scripts"

tail:
docker logs -f perception_wp
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

A Wordpress Plugin which classifies Media Library images by detecting individual objects and faces within images using [Google Cloud Vision API](https://cloud.google.com/vision/).

## Installation
This repository is the source code and won't work on your website, if you are looking for the plugin itself you can download the latest version from [here](https://github.com/amirandalibi/perception/releases/latest).

## Features

Detects broad sets of categories within an image, which range from modes of transportation to animals, popular product logos, popular natural and man-made structures, topical entities like celebrities, or news events.
Expand All @@ -10,14 +13,16 @@ Detects broad sets of categories within an image, which range from modes of tran

## Requirements

* [Docker](https://www.docker.com) `> 18.09`
- [Docker](https://www.docker.com) `> 18.09`

## Local Development

Docker is all you need for local development. With the docker daemon running, build and run the application using:

```sh
make start
```

the above command will build the image for both Wordpress and MySQL and run the containers and install Composer dependencies inside `src` folder.

Your Wordpress instance will be available on `http://localhost:8000`
Expand All @@ -30,11 +35,10 @@ Please note that Google Cloud Vision API is a commercial service and while it's

To better understand their pricing table, here is the list of the features we use in this plugin:

* Label Detection
* Landmark Detection
* Logo Detection
* Web Detection

- Label Detection
- Landmark Detection
- Logo Detection
- Web Detection

#### Set up your project

Expand All @@ -52,10 +56,8 @@ For using this plugin, You need to provide a JSON file which contains your Proje
4. From the **Role** dropdown, select **Project > Owner**.
5. Click the **Create** button. A JSON file that contains your key downloads to your computer.


Keep the **JSON** file on your computer, you will need it during the plugin installation.


## Contributing

Contributions are welcome. Create a pull request to get started.
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.3'

services:
db:
image: mysql:5.7
image: mysql/mysql-server:5.7.37
volumes:
- mysql_data:/var/lib/mysql
restart: always
Expand All @@ -20,7 +20,6 @@ services:
- db
build:
context: ./
image: wp
ports:
- "8000:80"
restart: always
Expand Down
24 changes: 12 additions & 12 deletions src/composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "accolade/perception",
"description": "A Wordpress plugin to detect broad sets of objects in your media library images, from flowers, animals, or transportation to thousands of other object categories commonly found within images.",
"require": {
"google/cloud-vision": "^0.5.0"
},
"license": "GPL-2.0+",
"authors": [
{
"name": "Amir Andalibi",
"homepage": "https://amirandalibi.com"
}
]
"name": "accolade/perception",
"description": "A Wordpress plugin to detect broad sets of objects in your media library images, from flowers, animals, or transportation to thousands of other object categories commonly found within images.",
"require": {
"google/cloud-vision": "^1.5"
},
"license": "GPL-2.0+",
"authors": [
{
"name": "Amir Andalibi",
"homepage": "https://amirandalibi.com"
}
]
}
Loading

0 comments on commit 9cf0d31

Please sign in to comment.