From 259b9382f225ad4b272239ab346ea2343f2591f4 Mon Sep 17 00:00:00 2001 From: Russell Taylor Date: Fri, 6 Dec 2019 18:52:27 -0500 Subject: [PATCH 1/5] Adding information on where to find the .NET framework. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85a6337..27afa38 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Release version can be found at: http://cver.hrail.crasar.org ## Visual Studio -* Microsoft .NET Framework 4.6.1 +* Microsoft .NET Framework 4.6.1. Visual Studio will ask whether you want to download it when you open the project and will point you to the download page at https://dotnet.microsoft.com/download/visual-studio-sdks?utm_source=getdotnetsdk&utm_medium=referral * Microsoft Visual Studio 2017 Installer Projects Extension * This can be installed by clicking ```Tools -> Extensions and Updates... -> Online``` then entering the name of the extension in the search box From 2db9c2630736a59559c2f8385a43a3500d80411e Mon Sep 17 00:00:00 2001 From: Russell Taylor Date: Fri, 6 Dec 2019 18:53:38 -0500 Subject: [PATCH 2/5] Updated whitespace. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 27afa38..888274b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ Release version can be found at: http://cver.hrail.crasar.org ## Visual Studio -* Microsoft .NET Framework 4.6.1. Visual Studio will ask whether you want to download it when you open the project and will point you to the download page at https://dotnet.microsoft.com/download/visual-studio-sdks?utm_source=getdotnetsdk&utm_medium=referral +* Microsoft .NET Framework 4.6.1. + * Visual Studio will ask whether you want to download it when you open the project and will point you to the download page at https://dotnet.microsoft.com/download/visual-studio-sdks?utm_source=getdotnetsdk&utm_medium=referral * Microsoft Visual Studio 2017 Installer Projects Extension * This can be installed by clicking ```Tools -> Extensions and Updates... -> Online``` then entering the name of the extension in the search box From fc75813781c959ddd019f27691cc8fa71fec6fcd Mon Sep 17 00:00:00 2001 From: Russell Taylor Date: Fri, 6 Dec 2019 19:03:24 -0500 Subject: [PATCH 3/5] Describing behavior at startup. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 888274b..3fc3128 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Release version can be found at: http://cver.hrail.crasar.org ## Python Setup +The first time the project is run inside Visual Studio, it will download and install the required Python packages. + * Python 3.6.4 * https://www.python.org * OpenCV From c3581f7e209d8405b75391bbeeb352a1a0748911 Mon Sep 17 00:00:00 2001 From: Russ Taylor Date: Mon, 9 Dec 2019 19:37:12 -0500 Subject: [PATCH 4/5] Making the DXDetector operate internally on UMat rather than Mat types so that it will call openCV code when it is available, making the calculation of that filter orders of magnitude faster on computers with powerful GPUs and reducing the energy cost of the calculations. Verified that the results look the same when run on a set of 9 different images. --- .../Computer Vision Toolkit/lib/Algorithms/DXDetector.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Computer Vision Toolkit/Computer Vision Toolkit/lib/Algorithms/DXDetector.py b/Computer Vision Toolkit/Computer Vision Toolkit/lib/Algorithms/DXDetector.py index 47d9b78..ce5de29 100644 --- a/Computer Vision Toolkit/Computer Vision Toolkit/lib/Algorithms/DXDetector.py +++ b/Computer Vision Toolkit/Computer Vision Toolkit/lib/Algorithms/DXDetector.py @@ -85,7 +85,7 @@ def DebrisDetect(img_path, Params): avg_dim = (((width+height)//2)//3)*2 # Gaussian Blur - proc_img = cv2.GaussianBlur(img, (5,5), Params["LineGaussianIter"]) + proc_img = cv2.GaussianBlur(cv2.UMat(img), (5,5), Params["LineGaussianIter"]) # Kernel Dilation proc_img = cv2.dilate(proc_img, (5,5), iterations=Params["LineDilationIter"]) @@ -97,7 +97,7 @@ def DebrisDetect(img_path, Params): dst = cv2.Canny(proc_img, Params["LineCannyEdgeLowerBound"], Params["LineCannyEdgeThreshold"]) cdst = cv2.cvtColor(dst, cv2.COLOR_GRAY2BGR) - lines = cv2.HoughLines(dst, 0.7, float(np.pi / 180.0), int(avg_dim/2)) + lines = cv2.HoughLines(dst, 0.7, float(np.pi / 180.0), int(avg_dim/2)).get() # If lines are found if lines is not None: @@ -124,13 +124,13 @@ def DebrisDetect(img_path, Params): else: # Gaussian Blur - proc2_img = cv2.GaussianBlur(img, (5,5), Params["CornerGaussianIter"]) + proc2_img = cv2.GaussianBlur(cv2.UMat(img), (5,5), Params["CornerGaussianIter"]) # Erosion proc2_img = cv2.erode(proc2_img, (5,5), iterations=Params["CornerErosionIter"]) # Stronger Bilateral Blur - proc2_img = cv2.bilateralFilter(proc2_img, 16, Params["CornerBilateralColor"], Params["CornerBilateralSpace"]) + proc2_img = cv2.bilateralFilter(proc2_img, 16, Params["CornerBilateralColor"], Params["CornerBilateralSpace"]).get() # Shi-Tomasi gray = cv2.cvtColor(proc2_img, cv2.COLOR_BGR2GRAY) From 9820af97d4cf34cdc06f99809411ed71ec69183f Mon Sep 17 00:00:00 2001 From: Russ Taylor Date: Tue, 10 Dec 2019 08:07:39 -0500 Subject: [PATCH 5/5] Adding parameter to allow pickle, which makes the code work with versions of numpy from 1.17.1. --- .../Computer Vision Toolkit/lib/Algorithms/AODNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Computer Vision Toolkit/Computer Vision Toolkit/lib/Algorithms/AODNet.py b/Computer Vision Toolkit/Computer Vision Toolkit/lib/Algorithms/AODNet.py index 209daee..27241ab 100644 --- a/Computer Vision Toolkit/Computer Vision Toolkit/lib/Algorithms/AODNet.py +++ b/Computer Vision Toolkit/Computer Vision Toolkit/lib/Algorithms/AODNet.py @@ -92,7 +92,7 @@ def Dehaze(img_path, Params = None, model_path = 'lib/Algorithms/pretrained_aod_ x = np.expand_dims(img, axis=0).transpose(0,3,1,2) # Loading model weights - np_weights = np.load(model_path).item() + np_weights = np.load(model_path, allow_pickle=True).item() output = aod_net(x, np_weights) output = np.squeeze(output)