Internal:QED
Quantum Edge Detection (QED)
Problem Statement
Edge Detection
Edge detection is a critical problem required in a wide variety of applications (find references). The primary goal is to find the borders of different regions within an image. There are a number of algorithms which provide reliable solutions to this problem. Filters including Sobel [1] and Canny [2] use gradient approaches while those similar to the Marr-Hildreth algorithm [3] uses a Laplacian filter to accomplish the same goal.
Quantum Edge Detection (QED)
Numerous attempts have been made at transitioning the classical edge detection algorithms into quantum versions. They tend to fall into the categories of (1) first-order Laplacians using quantum binary encoding, (2) gradient-based approaches, and (3) phase and amplitude encoding. A broad overview of all of these techniques can be found in Section 2 of this report [4].
Intent
The goal of this research is to assess the feasibility of such techniques when compared to classical implementations, as it seems that this has not been performed prior to designing the quantum algorithms. There will be a few main components to this project:
- Comparing the complexity of the classical and quantum algorithms.
- Proposing improved variants of the algorithms which make use of distributed hybrid classical-quantum implementations and comparing them to classical implementations.
- Making an overall determination as to the actual applicability of research in the area.
These goals will be achieved by a combination of analytical reasoning and code implementations which demonstrate the comparative performance of each algorithm.
Code
All of the code for this project can be found in the repository at wahab.hpc.odu.edu:/RC/group/RC_NIKOS/CodeRepository/quantum.git
The simplest way to access it is to clone the repo and then switch to the most current branch (optimized_dqhed):
git clone wahab.hpc.odu.edu:/RC/group/RC_NIKOS/CodeRepository/quantum.git git fetch -a git checkout optimized_dqhed
There are two main projects in this repo.
Canny
The directory at ./canny contains the work performed on replicating the canny quantum edge detection algorithm. It contains a .ipynb jupyter notebook demonstrating some of the capabilities.
DQHED2D
Depending on the repo branch, this directory contains the implementation for the 2D DQHED algorithm. The main program is located at ./qhed/src/mqhed.py and it requires a config file - an example of which can be found at ./qhed/config/config.ini. An example run would look like:
python3 mqhed.py -c ../config/config.ini
DQHED3D
The three dimensional version is located at ./dqhed/src/dqhed3D.py and it also requires a config file - an example exists at ./dqhed/config/config.ini. A run would look like:
python3 dqhed3D.py -c ../config/config.ini
This implementation is intended for a distributed cluster and has intensive performance requirements. It is not suggested to use the local option in the config file unless your machine has an excessive amount of main memory.
Progress
Analytical Reasoning
Staged
Implementations
Canny
The progress report for the Quantum Canny Edge Detection (QCED) implementation can be found here.
It is currently on hold because it was quickly determined that the operations detailed in most of the quantum binary implementations [4] require infeasible numbers an of qubits.
DQHED
The Distributed Quantum Hadamard Edge Detection (DQHED) implementation progress can be found here. The implementations are complete; however, the runtimes are on the order of fractions of an hour for realistically sized three-dimensional medical images. It remains to be seen how classical run times compare to this implementation, but it is expected that the results will be in favor of the original classical algorithms.
References
[1] Gupta, S., Mazumdar, S.G., & Student, M.T. (2013). Sobel Edge Detection Algorithm.
[2] Canny, J.F. (2009). Canny Edge Detection.
[3] Marr, D. and Ellen C. Hildreth. “Theory of edge detection.” Proceedings of the Royal Society of London. Series B. Biological Sciences 207 (1979): 187 - 217.
[4] P. Bao, L. Zhang, and X. Wu, “Canny edge detection enhancement by scale multiplication,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 27, pp. 1485–1490, 2005.