Skip to content
This repository was archived by the owner on Dec 24, 2021. It is now read-only.

Commit cd32f84

Browse files
authored
Merge pull request #6 from jomjol/raspi-rolling
Raspi rolling
2 parents e35353d + 9740281 commit cd32f84

22 files changed

+58
-5
lines changed

README.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,40 @@
11
# water-meter-system-complete
22

3-
This repository is the sum of different projects to read out an analog water meter with the help of a camera and image processing, including neural network processing to extract the values.
4-
The result is a HTTP-server, that takes an image as input, processes it and gives as an output the water meter number, including the subdigits.
3+
This repository describes a readout of an analog water meter with the help of a camera and image processing, including neural network processing to extract the values.
4+
The interface is a local HTTP-server, that takes an image as input, processes it and gives as an output the readout of the water meter counter, including the subdigits.
5+
6+
Although the server can be installed manually in a windows as well as an Linux system, it is strongly recommended to use the provided docker containers. The installation is due to the use of image processing (OpenCV, ...) and Neural Network Systems (Tensorflow) not really straight forward and I needed a lot of try and error. **Therefore I have decided to capsule the server in a docker container**. This is available for an Intel based System (e.g. Synology Docker) as well as an Raspberry PI Version.
7+
8+
9+
## Docker-Versions
10+
| Label | Content | Comments |
11+
| -------------- | ------------- | ------------- |
12+
| rolling | Experimental version for amd64-systems (e.g. Intel processors) | newest features, not fully tested |
13+
| raspi-rolling | Experimental version for armv7-systems (Raspberry PI3 and higher) | newest features, not fully tested |
14+
| latest | Latest stable version for amd64-systems (e.g. Intel processors) | Currently identical to v4.2.1 (2019-12-27) |
15+
| raspi-latest | Latest stable version for armv7-systems (Raspberry PI3 and higher) | Currently identical to v4.2.1 (2019-12-27) |
16+
| v4.x | Update to Tensorflow 2.0, fully automated build | Details see below |
17+
| v3.x | Tensorflow 1.4, manual build | Details see below |
18+
19+
20+
## Running docker
21+
Choose for the fitting docker tag and run the server with the following parameters:
22+
23+
```sudo docker run -p 3000:3000 --mount type=bind,source=/PATH_TO_LOCAL_CONFIG, target=/config --mount type=bind,source=/PATH_TO_LOCAL_LOG,target=/log jomjol/wasserzaehler:DOCKER_TAG```
24+
25+
#### Paramters
26+
| Parameter | Meaning | Example |
27+
| -------------- | ------------- | ------------- |
28+
| PATH_TO_LOCAL_CONFIG | Configuration parameters are stored in this path - easeast way to handle is a local copy of this directory | ```/home/pi/config``` |
29+
| PATH_TO_LOCAL_LOG | Logging paramters and images are stored in in this path - easeast way to handle is a local copy of this directory | ```/home/pi/config``` |
30+
| DOCKER_TAG | Docker tag for the correct docker version | ```raspi-latest``` |
31+
32+
The config and the log directory can be empty at the very first start. They will be loaded with a default configuratio, that can be modified afterwards.
33+
534

635
## Changelog - lastest version
36+
##### 4.3.0 (2019-12-20)
37+
* Update roi.jpg on every run
738
##### 4.2.1 (2019-12-17)
839
* Workaround for memory leak in tensorflow function predict() - see [https://github.com/keras-team/keras/issues/13118](https://github.com/keras-team/keras/issues/13118)
940
##### 4.2.0 (2019-12-07)
@@ -15,14 +46,14 @@ The result is a HTTP-server, that takes an image as input, processes it and give
1546
* Changed image processing within CNN to Pillow (instead of OpenCV)
1647
* Training analog and digital CNN with additional type of counter and digits respectivelely
1748

18-
### [Full Changelog](Changelog.md)
49+
### [Full Changelog](https://github.com/jomjol/water-meter-system-complete/blob/raspi-rolling/Changelog.md)
1950

2051

21-
The overall system with description of the single steps is described here: [https://github.com/jomjol/water-meter-measurement-system](https://github.com/jomjol/water-meter-measurement-system)
52+
The overall system with description of the single steps is described here: [https://github.com/jomjol/water-meter-measurement-system](https://github.com/jomjol/water-meter-measurement-system]()
2253

2354
A graphical overview about the steps is shown in the following flow:
2455

25-
<img src="./images/signal_flow.png">
56+
<img src="https://raw.githubusercontent.com/jomjol/water-meter-system-complete/raspi-rolling/images/signal_flow.png", width=800>
2657

2758
## Setup
2859

code/Dockerfile_raspi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM jomjol/raspberry-opencv-tensorflow
2+
3+
RUN [ "cross-build-start" ]
4+
5+
WORKDIR /
6+
7+
COPY . ./
8+
#RUN pip3 install --no-cache-dir ./wheels_raspi/opencv_contrib_python-4.1.1.26-cp37-cp37m-linux_armv7l.whl
9+
RUN pip3 install --no-cache-dir -r requirements_raspi.txt
10+
11+
12+
RUN [ "cross-build-end" ]
13+
14+
EXPOSE 3000
15+
16+
CMD ["python3", "./wasseruhr.py"]

code/image_tmp/alg.jpg

-450 Bytes
Loading

code/image_tmp/org.jpg

-215 Bytes
Loading

code/image_tmp/original.jpg

-310 Bytes
Loading

code/image_tmp/resize.jpg

9 Bytes
Loading

code/image_tmp/roi.jpg

183 KB
Loading

code/image_tmp/rot.jpg

-386 Bytes
Loading

code/image_tmp/zeiger1.jpg

-124 Bytes
Loading

code/image_tmp/zeiger2.jpg

85 Bytes
Loading

0 commit comments

Comments
 (0)