Giter Club home page Giter Club logo

phantoscope's Introduction

CI GitHub GitHub top language GitHub commit activity GitHub release (latest by date including pre-releases) Language grade: Python codecov

Phantoscope is an image search suite powered by Milvus and neutral networks.

Extremely high speed in processing and searching billions of images.

Compatible with Tensorflow, Pytorch, TensorRT, ONNX, XGBoost, and more.

Provides GUI for demonstrating search results and managing Phantoscope data.

Soon to establish an extension market, where you can share your extension with the world.

Native support for Docker and Kubernetes.

English | 中文版

Table of Contents

Background

Your search should not be confined to key words and short sentences.

With the explosion of images and video data in human society, the legacy text search can hardly serve people's needs.

For example, an image involves a myriad of information, and different people have different interpretation of the same image. The existing search engines, be it full-text search or searching image by image, can no longer meet such flexible multi-dimensional search requirements.

Phantoscope is the right tool for you. Empowered by miscellaneous deep-learning models, portable image processing techniques, and Milvus vector search engine, it can offer a unique set of high-performance image searching interfaces to address such needs.

Install

  1. Download Phantoscope:
$ git clone https://github.com/zilliztech/phantoscope.git -b 0.2.0 && cd phantoscope
  1. Set up the environment:
$ export LOCAL_ADDRESS=$(ip a | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'| head -n 1)
  1. Start up Phantoscope containers:
$ docker-compose up -d
  1. Check the status of all containers:
$ docker-compose ps

You are expected to see the following output:

Name                   Command                          State   Ports
----------------------------------------------------------------------------------------------------------------
phantoscope_api_1      /usr/bin/gunicorn3 -w 4 -b ...   Up      0.0.0.0:5000->5000/tcp                            
phantoscope_milvus_1   /var/lib/milvus/docker-ent ...   Up      0.0.0.0:19121->19121/tcp, 0.0.0.0:19530->19530/tcp
phantoscope_minio_1    /usr/bin/docker-entrypoint ...   Up      0.0.0.0:9000->9000/tcp                            
phantoscope_mongo_1    docker-entrypoint.sh mongod      Up      0.0.0.0:27017->27017/tcp

Quick Start

Click here to set up a basic Phantoscope application. You can use it to upload and search images.

Architecture diagram

Phantoscope basics

Tutorial

Tutorial

API reference

Click here to read our latest RESTful API reference.

Contributing

Contributions are welcomed and greatly appreciated.

Please read our contribution guidelines for detailed contribution workflow.

We use GitHub issues to track issues and bugs.

For general questions and public discussions, please join our community.

Community

Roadmap

GitHub milestones lays out the development plan for Phantoscope.

We hope you could team up with us in the development of Phantoscope.

License

Apache License 2.0

phantoscope's People

Contributors

abner-1 avatar bennu-li avatar cxie avatar dependabot[bot] avatar ijackwu avatar jinhai-cn avatar neza2017 avatar pahudplus avatar reigenaraka 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phantoscope's Issues

Milvus started error due to a older version. How can I resolve it?

Error: failed to open database: Meta Tables schema is created by Milvus old version. Possible reason: Meta Tables schema is damaged or created by in-compatible Milvus version.
/var/lib/milvus/docker-entrypoint.sh: line 7: 6 User defined signal 1 ./start_server.sh

error while upload images

error in search logs.

'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
/usr/local/lib/python3.6/dist-packages/flask_sqlalchemy/__init__.py:835: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
  'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
[2020-05-26 02:59:29,221] ERROR in pipeline.pipeline 218: ('Execute with error', <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.RESOURCE_EXHAUSTED
	details = "Received message larger than max (8725449 vs. 4194304)"
	debug_error_string = "{"created":"@1590461969.221399073","description":"Error received from peer ipv4:192.168.2.3:50001","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"Received message larger than max (8725449 vs. 4194304)","grpc_status":8}

When meets this bug, load data crashed. (Need to fix it)
This error is fortuitous. record it.

Failed to create operator after run docker-compose up

curl --location --request POST '127.0.0.1:5000/v1/operator/regist' \
> --header 'Content-Type: application/json' \
> --data-raw '{
quote>     "endpoint": "127.0.0.1:50001",
quote>     "name": "vgg_example"
quote> }'
{"message": "opeartor vgg_example regist error", "error": "OperatorRegistError"}% 

Two problems under MacOS

Describe the bug
A clear and concise description of what the bug is.

  • need to run the command[‘docker-compose up -d’] twice,table of mysql can be created successfully。
  • upload images error:ERROR:root:Upload file 'xxx.jpg' error due to: name 'upload_url' is not defined。Becuase multiprocessing on Macos cannot access ‘upload_url’ in load_data.py

Steps/Code to reproduce behavior
Follow this guide to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.

Expected behavior
A clear and concise description of what you expected to happen.

Environment details

  • Docker info
  • Phantoscope version (v0.1.0)

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

provide install/upgrade tools

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

provide a tools for user install/upgrade

Describe alternatives you've considered

Additional context

0.2.0 search result not sort as distince

Describe the bug
0.2.0 search result not sort as distince

Steps/Code to reproduce behavior
not sort after find from mongo

Expected behavior
search result sort with distince

Environment details

  • Docker info
  • Phantoscope version v0.2.0

curl: (52) Empty reply from server

phantoscope 0.2.0

root@dssy-milvus:/home/phantoscope# ./scripts/prepare.sh

Register operators named vgg16
{"name": "vgg_encoder", "addr": "psoperator/vgg16-encoder:latest", "author": "ph antoscope", "version": "0.1.0", "type": "encoder", "description": "vgg16 encoder ", "runtime_client": "docker", "metadata": {"id": "94f0aa47-ede5-4d07-aeef-c78cd 8c4fbe0", "create_time": "2020-07-28 06:20:44.427142", "resource_type": "Operato r", "state": "created"}}\n
create operator instance
curl: (52) Empty reply from server
\nsleep 10s for instance warmup
Create pipeline with created instance vgg16
{"message": "No such container: phantoscope_vgg_encoder_vgg_instance1", "error": "DockerRuntimeError"}\nCreate application with the created pipeline before
{"message": "pipeline example_pipeline not exist", "error": "ArgsCheckError"}

Make all failed

'Make all' is not implemented in Makefile.
error log:
make: *** No rule to make target 'all'. Stop.

register operator, but endpoint is 127.0.0.1

curl --location --request POST '192.168.2.3:5000/v1/operator/regist' \
--header 'Content-Type: application/json' \
--data-raw '{
    "endpoint": "192.168.2.3:50011",
    "name": "xception"
}'

Endpoint of operator information is from operator result, but It must now is default 127.0.0.1
So, any docker operator must be set OP_ENDPOINT environment.
Any other good idea?

prepare.sh return error

我的执行步骤
1.下载 Phantoscope
git clone https://github.com/zilliztech/phantoscope.git -b 0.1.0
cd phantoscope

2.设置环境变量
$ export LOCAL_ADDRESS=$(ip a | grep -Eo 'inet (addr:)?([0-9].){3}[0-9]' | grep -Eo '([0-9].){3}[0-9]' | grep -v '127.0.0.1'| head -n 1)

3.启动 Phantoscope 容器:
$ sudo docker-compose up -d

4.检查所有容器状态
$ sudo docker-compose ps
Ok

5.创建pipeline
chmod +x scripts/prepare.sh
./scripts/prepare.sh

这儿返回了错误:
{"message": "opeartor vgg16 regist error", "error": "OperatorRegistError"}{"message": "query from sql error", "error": "QueryFromSQLError"}{"message": "query from sql error", "error": "QueryFromSQLError"}

Change all latest tag images in 0.1.0 to be tag 0.1.0

Report incorrect documentation

0.2.0 docs is perpared now. Some tags should be fixed to 0.1.0 instead of latest.

Location of incorrect documentation
All document should be checked.

Describe the problems or issues found in the documentation
0.2.0 docs is perpared now. Some tags should be fixed to 0.1.0 instead of latest.

Steps taken to verify documentation is incorrect
All commands in 0.1.0 will be true after 0.2.0 image uploaded.

Suggested fix for documentation
None


Report needed documentation

Maybe a doc about multi branch example is welcomed.

load_data.py need more function

  1. support assigned application_name
  2. support getting fields by get aplication information
  3. support setting data path by command

quick start error

Endpoint can not be 127.0.0.1. It should be edited as local area ip.
How can it work more convenient?

quick start command not sucess.

In upload images:

        tar xvf /tmp/vgg-example.tar
	python load_data.py

first command must in '/tmp' path and second must be executed in '/path_to_omnisearch/docs/quick_start'

prepare.sh return error

设置环境变量
export LOCAL_ADDRESS=$(ip a | grep -Eo 'inet (addr:)?([0-9].){3}[0-9]' | grep -Eo '([0-9].){3}[0-9]' | grep -v '127.0.0.1'| head -n 1)

Phantoscope 正在运行:
phantoscope_api_1 /usr/bin/gunicorn3 -w 4 -b ... Up 0.0.0.0:5000->5000/tcp
phantoscope_milvus_1 /var/lib/milvus/docker-ent ... Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:8080->8080/tcp
phantoscope_minio_1 /usr/bin/docker-entrypoint ... Up 0.0.0.0:9000->9000/tcp
phantoscope_mongo_1 docker-entrypoint.sh mongod Up 0.0.0.0:27017->27017/tcp
phantoscope_mysql_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
phantoscope_vgg_1 python3 server.py Up 0.0.0.0:50001->50001/tcp

运行 scripts 文件夹下的 prepare.sh 脚本 出现错误
./scripts/prepare.sh
{"message": "opeartor vgg16 regist error", "error": "OperatorRegistError"}{"message": "operator vgg16 not exist", "error": "NotExistError"}{"message": "pipeline not exist", "error": "NotExistError"}

ERROR in operators.operator 103: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"

make all failed due to none utils

$ make all
PYTHONPATH=/home/abner/workspace/git/omnisearch/search pytest tests
================================================================================ test session starts ================================================================================
platform linux -- Python 3.6.9, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
rootdir: /home/abner/workspace/git/omnisearch
collected 0 items / 1 error

====================================================================================== ERRORS =======================================================================================
_______________________________________________________________________ ERROR collecting tests/test_utils.py ________________________________________________________________________
ImportError while importing test module '/home/abner/workspace/git/omnisearch/tests/test_utils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_utils.py:2: in
from common.utils import save_tmp_file
E ModuleNotFoundError: No module named 'common.utils'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================= 1 error in 0.04s ==================================================================================
Makefile:9: recipe for target 'test' failed
make: *** [test] Error 2

Yaml like config file support

Is your feature request related to a problem? Please describe.

None

Describe the solution you'd like
Support create application pipeline operator created by yaml file

Describe alternatives you've considered

Additional context

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.