25
Improve computation complexity of sobel edge detection using contract anytime algorithm Presented By Md Kamal Hossain Shajal - 12101073 Md Asif Ibtehaz - 14341001 Md Assaduzzaman Ashique - 12301017 Supervisor Dr. Jia Uddin Ass professor BRAC University Department of Computer Science & Engineering [email protected]

Thesis Final Presentation

Embed Size (px)

Citation preview

Page 1: Thesis Final Presentation

Improve computation complexity of sobel edge detection using contract

anytime algorithmPresented By

Md Kamal Hossain Shajal - 12101073Md Asif Ibtehaz - 14341001

Md Assaduzzaman Ashique - 12301017SupervisorDr. Jia UddinAss professorBRAC UniversityDepartment of Computer Science & [email protected]

Page 2: Thesis Final Presentation

Presentation OutlineIntroductionProposed ModelExperimental SetupResult AnalysisConclusion

Page 3: Thesis Final Presentation

IntroductionWhat is Edge Detection

Definition Different Edge Detection Technique

Canny Edge Detection TechniqueSobel Edge Detection Technique

Page 4: Thesis Final Presentation

Why Edge Detection is Important Medical Image processing (Detect

the edge of lungs CT scan) Shape and object recognition Traffic Management Line detection from blurry image

Page 5: Thesis Final Presentation

Continue Replacing Sniko Technology

Input Image Output Image

Page 6: Thesis Final Presentation

Proposed Model

Edge detection (Sobel)

Gray Scale Conversion

Image Input

Output

Proposed Model

Page 7: Thesis Final Presentation

Conventional Implementation of Sobel in Java

Output for a 1920 x 1024 Input Image in Java

Page 8: Thesis Final Presentation

Introducing Sobel in Parallel Computing

Edge detection

(Sobel)

Gray Scale Conversion

Image InputCPU

GPU

OutputCPU

Proposed Model (Sobel in Parallel Computing)

Page 9: Thesis Final Presentation

Introducing Anytime Algorithm What is Anytime Algorithm Types of Anytime Algorithm

Contract Anytime Algorithm Interruptible Anytime Algorithm

Page 10: Thesis Final Presentation

Contract Anytime Algorithm

Input Quick Process

Half Process

Full process Output

Less

More

Low HighContract Anytime Algorithm

Page 11: Thesis Final Presentation

Sobel Edge Detection Technique using Contract Anytime Algorithm in Parallel Computing

Edge detection (Sobel) Contract

Anytime Algorithm for Sobel

Gray Scale Conversion

Image InputContract Anytime

Algorithm to convert in gray scale

Output

Proposed Model

CPU

GPU

CPU

Page 12: Thesis Final Presentation

Experimental Environment Software Specification

Visual Studio 2013 CUDA ToolKit 7.5 .NET C++ JAVA 7 Eclipse MARS Create A Graph (online tool) OpenGL

Hardware Specification AMD FX5320 CPU RAM 8 GB NVIDIA GTX 550 TI

Page 13: Thesis Final Presentation

GTX 550ti GPU Engine SpecsParameters Value

CUDA Cores 192

Graphics Clock (MHz) 900

Processor Clock (MHz) 1800

Texture Fill Rate (billion/sec) 28.8

Total amount of shared memory per block 49152 bytes

Maximum number of threads per block 1024

CUDA Driver Version / Runtime Version 7.5 / 7.5

TABLE GTX 550ti GPU Engine Specs

Page 14: Thesis Final Presentation

Result Analysis – Implementation using Java

Output for Input Image Higher than 1920 pixel

Page 15: Thesis Final Presentation

Sobel Edge Detection Implementation using Parallel Computing

Output of [Image 1] for block dimension 16.

Output of [Image 1] for block dimension 32.

Sample Image 1

Page 16: Thesis Final Presentation

Implementing Contact Anytime Algorithm in Sobel Edge Detection (16 block)

(a) Test Image 2 (b) Test 1(quick) 

(c) Test 2(half) 

(d) Test 3(full) Three contract-time process test for 16 block dimension

Test (b, c, and d)

Page 17: Thesis Final Presentation

Implementing Contact Anytime Algorithm in Sobel Edge Detection (32 block)

(a) Test Image 1 (b) Test 1(quick) 

(c) Test 2(half) 

(d) Test 3(full) Three contract-time process test for 32 block dimension

Test (b, c, and d)

Page 18: Thesis Final Presentation

Time Comparison between Java and Sobel Anytime Algorithm

Time Comparison of 1920 x 1024 Input Image

Time Comparison of 4096 x 4096 Input Image

Page 19: Thesis Final Presentation

Time Comparison (Sobel with Anytime 16 block and 32 block)

Process versus Time for 16 and 32 block dimension.

Page 20: Thesis Final Presentation

Overall Comparison

PROCESSCPU – GPU

TIME (MS)

THREADS PER

BLOCKBLOCK SIZE

JAVA

EXECUTION

TIME (MS)

SPEED

UP

(AGAI

NST

JAVA)

16 BLOCK

DIMENSION

QUICK 119.899

256 8192 480

4.003

X

HALF 127.809 3.7X

FULL 127.992 3.75X

32 BLOCK

DIMENSION

QUICK 138.227

1024 2048 480

3.47X

HALF 141.027 3.4X

FULL 141.601 3.38XResult comparison for an 1920 x 1024 Input Image

Page 21: Thesis Final Presentation

Conclusion Future Work

Real time using contract-based anytime algorithm

Interruptible anytime algorithm. Limitation

CUDA 7.0 Toolkit Visual Studio Extension Error Tesla Architecture

Page 22: Thesis Final Presentation
Page 23: Thesis Final Presentation

Appendix

Parallel Computing Anytime Algorithm Experiment

Page 24: Thesis Final Presentation

Parallel Computing

Threads per Warp 32

Warps per Multiprocessor 64

Threads per Multiprocessor 2048

Thread Blocks per Multiprocessor 16

Total # of 32-bit registers per Multiprocessor 65536

Register allocation unit size 256

Register allocation granularity warp

Registers per Thread 255

Shared Memory per Multiprocessor (bytes) 49152

Shared Memory Allocation unit size 256

Warp allocation granularity 4

Maximum Thread Block Size 1024

Source. NVIDIA Occupancy calculator

Source. NVIDIA Understanding parallel computing

Source. NVIDIA NVIDIA GPGPU

Page 25: Thesis Final Presentation

Anytime Algorithm

Figure 6 page 15

Result ← INITIALIZATION-STEP (Input(x, y)) REGISTER-RESULT (Result) x ← 0; y ← 0; While (x < h) { While (y < w) {

Output(x, y) ← Input(x, y);  

y ← y + 2; } SIGNAL (TERMINATION) HALT } w ← w/2; h ← h/2;