AR application for counting stack of pipes
View Demo
·
Report Bug
·
Request Feature
Given :
Actions :
Deployment is made on an android app. Now we can just walk around the pipe field in a given direction and it will detect the stack with the given count. The idea is that we are given with list of detections in one direction, and the app should keep a track of detections.
Final count = Number of detections * Template count
Hough Circles are taken to identify pipe circular structure and templates are saved.
Manual crops of pipe with tags and caps should taken by human in loop.
Choose a template according to a part of image (very important)
Use the templates to train a feature generation model
Use the old database created from other videos, if type of pipes are same.
Once trained, model is tested on validation data for more images
If validation accuracy is good, then pass the model to deployment module
To get a local copy up and running follow these simple steps.
git clone https://github.com/Princep/legendary-octo-goggles.git
Colab offers customizable solutions for images.
OpenCV: Built-in fast Hough transform inference for processing. Modify radius for size | Result: Each circle is properly detected, Easy front view can be taken |
Manual: Select a area which seems to be repeatable area | Area count = 4: Can be an area which contains tags or atleast 3 pipes |
Save the template image with the decided count
Matching Your Own Template Images
To build the index file for all templates in the directory, run
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 \
mediapipe/examples/desktop/template_matching:template_matching_tflite
bazel-bin/mediapipe/examples/desktop/template_matching/template_matching_tflite \
--calculator_graph_config_file=mediapipe/graphs/template_matching/index_building.pbtxt \
--input_side_packets="file_directory=<template image directory>,file_suffix=png,output_index_filename=<output index filename>"
The output index file includes the extracted KNIFT features.
cd mediapipe
# Switch to OpenCV 4
sed -i -e 's:3.4.3/opencv-3.4.3:4.0.1/opencv-4.0.1:g' WORKSPACE
sed -i -e 's:libopencv_java3:libopencv_java4:g' third_party/opencv_android.BUILD
# Build and install app
bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/templatematchingcpu
adb install -r bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/templatematchingcpu/templatematchingcpu.apk
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
Your Name - @pp_spector - prince.patel.14@gmail.com
Project Link: https://github.com/Princep/legendary-octo-goggles