Skip to content

Commit 04c4b3a

Browse files
authored
Add files via upload
1 parent d9ef543 commit 04c4b3a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Python Version = 3.6
99
OpenCV Version = 4.1.1
1010

1111
#Code Execution
12+
1213
**Selective Search**
1314
To run the code, download it and execute using the following command in terminal/command prompt:
1415

@@ -20,6 +21,7 @@ To run the code, download it and execute using the following command in terminal
2021

2122
Eg: python selective_search.py ./JPEGImages/1.jpg ./Annotations/1.xml color
2223

24+
2325
**EdgeBoxes**
2426
To run the code, download it and execute using the following command in terminal/command prompt:
2527

@@ -31,7 +33,7 @@ To run the code, download it and execute using the following command in terminal
3133
Eg: python edgeboxes.py ./JPEGImages/1.jpg ./Annotations/1.xml
3234

3335
## Data
34-
The sample color images are present in '/JPEGImages/' folder and their corresponding ground truth boxes are present in '/Annotations/' folder. An example of the bounding box coordinates (saved in .xml file) is in the following format:
36+
The sample color images are present in `/JPEGImages/` folder and their corresponding ground truth boxes are present in `/Annotations/` folder. An example of the bounding box coordinates (saved in .xml file) is in the following format:
3537

3638
<object>
3739
<name>aeroplane</name>
@@ -69,7 +71,7 @@ The steps followed in implementing the code are as follows:
6971
14) Find those bounding box that have the maximum/best overlap for each ground truth box and display them.
7072
15) Calculate the recall for each image.
7173

72-
###EdgeBoxes
74+
### EdgeBoxes
7375
The Edge Boxes algorithm uses edges to detect objects. The overlying idea of this algorithm is that if a bounding box contains a large number of entire contours, then the bounding box has a high probability to contain an object. More information about EdgeBoxes can be found in the paper (https://www.researchgate.net/publication/319770284_Edge_Boxes_Locating_Object_Proposals_from_Edges)
7476

7577
The steps followed in implementing the code are as follows:
@@ -90,27 +92,27 @@ The steps followed in implementing the code are as follows:
9092
15) Experiment with different values of alpha and beta.
9193

9294
## Evaluation Metric
93-
**Intersection over Union**
95+
### Intersection over Union
9496
We evaluate the proposed bounding boxes generated by Selective Search and EdgeBoxes algorithms using Intersection over Union (IoU) metric which is defined as:
9597

9698
Intersection over Union (IoU) = Area of overlap / Area of union
9799

98100
Here, Area of overlap is the area of intersection between the ground truth box and the proposed bounding box. Area of Union is the total area encompassed by both the ground truth box and the proposed bounding box. If the ground truth box and the proposed bounding box do not overlap, then the IoU is 0.
99101

100-
**Recall**
102+
### Recall
101103
We calculate the “recall” of ground truth bounding boxes by computing what fraction of ground truth boxes are overlapped with at least one proposal box with Intersection over Union (IoU) > 0.5.
102104

103105
## Analysis
104106
My analysis on these algorithms are listed below for one of the images (Image 5 in the *Results.pdf* file)
105107

106-
**Selective Search:**
108+
### Selective Search:
107109
The test image shown in Appendix A - Image 5 has been annotated with 13 ground truth boxes. The results obtained using color strategy only have a total of 334 proposed bounding boxes. The number of proposal boxes found to have an IoU greater than 0.5 with any of the ground truth boxes is six. Out of these six proposal boxes, only four ground truth boxes have an overlap with atleast one proposal box. The recall for this image using only color strategy is 0.307.
108110

109111
The results obtained using all strategies i.e. color, fill, texture and size contain a total of 354 proposed bounding boxes. The number of proposal boxes found to have an IoU greater than 0.5 with any of the ground truth boxes is eight. Out of these eight proposal boxes, only seven ground truth boxes have an overlap with aleast one proposal box. The recall for this image using all strategies is 0.5384.
110112

111113
In general, Selective Search using all strategies had a better performance (better recall) when compared to just the color strategy. In our particular image (Image 5) that we considered, we can notice that the image has a variety of colors. Since our code utilizes only the top 100 proposal boxes of relevance, the color strategy is not effectively able to detect all objects of interest (detects 4), where as when the algorithm uses all strategies, we are able to get significantly better results (detects 7). If we expand the number of proposal boxes from 100 to a larger number (say 1000 or 2000), we are able to get a better performance/recall (0.92/1.0) for both strategies. In general, utilizing selective search algorithm with all strategies would give a better performance than using just the color strategy. Additionally, sometimes the results using color algorithm could be good as well depending upon the image we are trying to run the algorithm on.
112114

113-
**EdgeBoxes:**
115+
### EdgeBoxes:
114116
The test image shown above in Appendix B - Image 5 has been annotated with 13 ground truth boxes. On selecting the proposed bounding boxes with the top 100 scores, we found that the number of proposal boxes that have an IoU greater than 0.5 with any of the ground truth boxes is 12. Out of these 12 proposal boxes, only four ground truth boxes have an overlap with atleast one proposal box. The recall for this image using edgeboxes algorithm is 0.307.
115117

116118
Following are a few cases of experimenting with different values of alpha and beta:
@@ -120,7 +122,7 @@ Case 3: Setting alpha and beta as 0.8 had a poorer recall than case 2 , but it g
120122

121123
Setting alpha as 0.5 and beta as 0.5 seemed to give me the best performance in terms of recall.
122124

123-
**Comparison between EdgeBoxes and Selective Search:**
125+
### Comparison between EdgeBoxes and Selective Search:
124126
EdgeBoxes for this particular image (Image 5) did not give a significantly improved performance than selective search. However looking at all the images in appendix A and appendix B, edgeboxes in general gave a better performance than selective search.
125127
I noticed that the proposal boxes generated using edgeboxes were larger in size than the proposal boxes using selective search algorithm because the edgeboxes algorithm tried to detect those boxes which have a lot of contours inside them and scored them highly. So the top 100 scores assigned by the edgeboxes algorithm were generally the larger bounding boxes and thus they had a higher probability of having an IoU > 0.5 with any of the ground truth boxes.
126128

0 commit comments

Comments
 (0)