Get started
Installation
1. Get source code
git clone https://github.com/merceedge/MerceEdge.git
git submodule init
git submodule update
2. Install python3.6 environment
It is best to use virtualenv or pipenv, please install according to your operating system environment.
Install a mqtt server locally (because MerceEdge uses the MQTT service, we need an MQTT server. We can also specify an existing MQTT service in MerceEdge, which will be introduced in the following document. Here we install an MQTT service directly. Just fine). This example uses the mosquitto service. You can download it by referring to here. After installation, it will run by default:
mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf
3. Install MerceEdge
(MerceEdge) / # cd MerceEdge
(MerceEdge) MerceEdge # python setup.py develop
4. Verify that the installation
(MerceEdge) MerceEdge # edge
__ __ _____ _
| \/ | ___ _ __ ___ ___| ____|__| | __ _ ___
| |\/| |/ _ \ '__/ __/ _ \ _| / _` |/ _` |/ _ \
| | | | __/ | | (_| __/ |__| (_| | (_| | __/
|_| |_|\___|_| \___\___|_____\__,_|\__, |\___|
|___/
Load user config file:
...
* Serving Flask app "merceedge.api_server.app" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
Run the demo
5. Run an example of edge computing
(First Ctrl + c stop the above edge run)
(Then modify the configuration file of the demo formula)
(Modify ./merceedge/tests/formula/rtmp_demo_formula.yaml line 24, then save and exit vim
rtmp_url: "rtmp://change_your_rtmp_path_here" or rtmp_url: "/local_path/test_video.mp4"
)
(MerceEdge) MerceEdge # vim merceedge/tests/formula/rtmp_demo_formula.yaml
(Let's run)
(MerceEdge) MerceEdge # edge -f ./merceedge/tests/formula/rtmp_demo_formula.yaml
6. Open another terminal window, and also use the MerceEdge virtualenv set up earlier, run the following command:
(MerceEdge) MerceEdge # cd merceedge/tests/demo
(MerceEdge) demo # python object_detector_ui.py
You will see like this: