235015, Artificial Intelligence ปัญญาประดิษฐ์ 3(2-2-5) สัปดาห์ที่ 1 ขั้นตอนวิธีเชิงพันธุกรรม (Genetic Algorithm)
Outline Objectives 1 p p 2 Genetic Algorithm Principle 3 Genetic Algorithm & Application 4 What is Genetic Algorithm ?
Objectives เพื่อให้นิสิตรู้และเข้าใจในกระบวนการทาง พันธุกรรมศาสตร์ เพื่อให้นิสิตเรียนรู้และเข้าใจเกี่ยวความสัมพันธ์ของ กระบวนการทางพันธุกรรมศาสตร์กับงานด้าน คอมพิวเตอร์ เพื่อให้นิสิตสามารถประยุกต์ใช้ของกระบวนการ ทางพันธุกรรมศาสตร์ เพื่อแก้ปัญหาโจทย์ประยุกต์ ด้านคอมพิวเตอร์ได้
Outline Objectives 1 p p 2 Genetic Algorithm Principle 3 Genetic Algorithm & Application 4 What is Genetic Algorithm ?
ไทย : หลักการและประวัติของปัญญาประดิษฐ์ ปริภูมิสถานะและการค้นหา ขั้นตอนวิธีการ ค้นหาการแทนความรู้โดยใช้ตรรกะเพรดิเคต วิศวกรรมความรู้ โปรล็อกเบื้องต้น การ ประมวลผลภาษาธรรมชาติเบื้องต้น การ เรียนรู้ของเครื่องจักร โครงข่ายประสาท เทียม ขั้นตอนวิธีเชิงพันธุกรรม หุ่นยนต์ อังกฤษ : -
Outline Objectives 1 p p 2 Genetic Algorithm Principle 3 Genetic Algorithm & Application 4 What is Genetic Algorithm ?
Genetic Algorithm Process
Overview of object tracking system Trajectory Tracking Algorithm 100 frames Graph of distance 100 frames Input dataTracking MethodOutput data 3
The trajectory-based ball detection and tracking Frames Sequence Input data Output data
How to separate the ball ?
(X 1,Y 1,D 1 ) (0,0) (X 2,Y 2,D 2 ) (X 3,Y 3,D 3 ) (X 4,Y 4,D 4 ) (X 5,Y 5,D 5 ) (X 6,Y 6,D 6 ) 14
Ball Candidates Representation 15
Initial Population
Reference Frame Data
Fitness Value Evaluation Where = Euclidean Distance = X-Coordinate = Y-Coordinate
Fitness value estimation Where = Fitness value per point or frame = Distance between frame = Number of population = Number of frame 46
Select the Best Population Best Population 8 Chromosome
Crossover operator Possible cross point Random 20 Chromosome for Crossing Over
Mutation operator Random 8 Mutation Chromosome
Random operator 4 New Random Chromosome
Replace all Offspring in New Generation = 40 ?
Outline Objectives 1 p p 2 Genetic Algorithm Principle 3 Genetic Algorithm & Application 4 What is Genetic Algorithm ?
Overview of object tracking system Trajectory Tracking Algorithm 100 frames Graph of distance 100 frames Input dataTracking MethodOutput data 3
How to classify ball from the other objects? 10
Filtering process The ball candidate objects can be detected by 4 Boolean Function of sieve processes, there are: Color range filter ->(H, S, V) Line filter Shape filter Size filter 11
What is the candidate objects? Where = Boolean Function of Candidate Objects = Boolean Function of All Objects in Frame 12
Ball candidates representation Where = Candidate Objects in Frame = X-Coordinate = Y-Coordinate = Distance 13
(X 1,Y 1,D 1 ) (0,0) (X 2,Y 2,D 2 ) (X 3,Y 3,D 3 ) (X 4,Y 4,D 4 ) (X 5,Y 5,D 5 ) (X 6,Y 6,D 6 ) 14
Input candidates before plot graph 15
Best ball trajectory verification Distance Frame No
Results of segmentation & filtering 17
Position of strength line in frame IndexX- position Y- position DistanceArea
After Background Subtraction 19
20
Euclidean distance tracking Distance Time k-1kk+1 d E1 Shortest = d E2 CurrentNext Past d E2 d E3 21
Example of skeleton trajectory 22 Kalman Filter -> Temp position
23
Miss frame identification Kalman Filter -> Temp position 24
Kalman filter system 25
Kalman Filter Process Distance Time k-1kk+1 Prediction Correction by ROI CurrentFuture Past d E1 > Th d d E2 > Th d 26
Example disadvantage of Kalman Filter “ROI” CUT FOR FINDING SUITABLE OBJECT 27
ROI area specification 50 pixel ROI 28 Temp Position-> Kalman Filter
ROI segmentation The propose of ROI segmentation is finding the candidate ball objects in the interesting area by objective function, that compost of 6 parameters there are: 3 o f color parameters (H, S, V) ->Color improvement Distance parameter -> Distance normalization Shape parameter-> Major and minor axis ratio Area parameter -> Average area of previous ball 29
Statistical Dissimilarity Measurement Where = Statistic dissimilarity measurement = Mean of interesting object = Mean of data set = Variance of interesting object = Variance of data set 30
Statistical Similarity Where = Probabilistic value that transfer from statistic similarity measurement = Statistic dissimilarity measurement 31
An objective function w 1 = weight of distance w 2 = weight for Hue w 3 = weight for Saturation w 4 = weight for Intensity w 5 = weight for Shape of the object w 6 = weight for Area of the object 32 3 objects upon to probability priority
Color improvement by region reduction (x b,y b ) x b y b (x c,y c ) (x b,y b ) x b y b (x c,y c ) 33 ROI
Type of an objects in ROI Type#1 Type#2 Type#3 Type#0 Type#4 34
No object & single object in ROIs No object in ROI segmentation is Type#0 Single object in ROI segmentation is Type#1 35
Many objects in ROIs Type#2 Type#3Type#4 36
Average types values of objects Where = Object type = Integer number represent type of object = Average value type of each object 37
Weight of ROI types ROI type = ? Type#3 = Type#4 = Type#0 = 38
The specification of ROI type Where = Region of interest segmentation type 39
40
Multiple trajectory generation Distance Time Path 1 Path 2 Path 3 41
Genetic Algorithm Process 42
Chromosome representation a = The number for specific method c = Index region of frame e, f = Population number and frame number b, d = Not use now 43
Initial chromosome or population 44
Reference frame data index region 45
Fitness value estimation Where = Fitness value per point or frame = Speed between frame = Distance between frame = Number of population = Number of frame 46
Fitness value & weight type Where = Fitness value per point or frame after weight = Constant weight value 47
Best trajectory verification Where = Fitness value per path or all trajectory path = Best path or best trajectory path 48
Best ball trajectory verification Distance Time Path 1, F 1 = 120 Path 2, F 2 = 55 Path 3, F 3 = 75 49
Kalman Filter Distance Time Frame Linear 50
Cubic spline interpolation Distance Time Frame Curve 51
52
Example result after previous process 53
Case of impulse transience Single-point Impulse Transience Multi-point Impulse Transience 54
Hierarchy adaptive window size technique Where = Threshold = = Speed between contiguous frame = Window size 55
Example of error before using HAWz 56
Example of refinement result 57
The End 73