Skip to content

Commit b2f8f12

Browse files
committed
update readme
1 parent 3a67626 commit b2f8f12

11 files changed

+116
-1219
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.ipynb_checkpoints/*
2+
.vscode/*
3+
nohup.out
24
SAR-Ship-Dataset/*
35
build/*
46
*.jpg

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"files.associations": {
33
"ratio": "cpp"
4-
}
4+
},
5+
"git.ignoreLimitWarning": true
56
}

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
## Vessel Detection in Synthetic Aperture Radar(SAR) Images
2-
### Dataset
3-
A recently published dataset consisting of 43,819 ship chips is used to evaluate vessel detection "A SAR Dataset of Ship Detection for Deep Learning under Complex Backgrounds" [GitHub](https://github.com/CAESAR-Radi/SAR-Ship-Dataset)
4-
[Paper](https://www.mdpi.com/2072-4292/11/7/765/htm)
2+
This repo is created to evaluate the vessel detections in SAR images though traditional methods e.g different variants of CFAR and deep learning target detection architectures.
3+
An annotated dataset by SAR experts was recently published consisting of 43,819 ship chips is used to evaluate vessel detection "A SAR Dataset of Ship Detection for Deep Learning under Complex Backgrounds" [GitHub](https://github.com/CAESAR-Radi/SAR-Ship-Dataset)
4+
[Paper](https://www.mdpi.com/2072-4292/11/7/765/htm). This dataset is used to evaluate the detection. We split the dataset into training and evaluation sets. Evaluation set consists of Last 3819 images. First 40000 images are used for training deep-learning models.
55

6+
This repo detects vessels through CA CFAR and saves the results for further evaluation.
67
### Pre Processing
78

89
Morphological operations such as erosion is applied to the images. Erosion removes islands and small objects(speckle) so that only substantive targets remain in SAR images. Then we apply median blur filter to eroded image.
@@ -17,4 +18,19 @@ To come up with the threshold value CA CFAR algorithm is used. A sliding window
1718
- Pn is noise power estimated by background cells
1819
- CUT is classified as target(vessel) when CUT > T
1920

21+
CFAR algorithm and other pipeline operations are extended in python from c++ to gain real time detection results.
22+
We use opencv for Morphological operations, image blur filters, bounding boxes rendering.
23+
24+
The detection boxes are drawn with ground truth boxes and saved for visualization, results are stored in txt file for each image with original filename in following format.
25+
26+
Ship 0.8 x y w h
27+
28+
To run the detection on dataset set data_dir in run.py and run parse_xml.py to parse ground truth from xml file to a text file in following format
29+
30+
Ship x y w h
31+
32+
python parse_xml.py
33+
python setup.py install
34+
python run.py
35+
2036
For more details and experimental results [DropBox Paper](https://paper.dropbox.com/doc/SAR-vessel-detection--Ag8sKJlxfjm1uQAg_B7BwnabAg-i6ifPVu9dKsqu7dwgKoJa)

eval.ipynb

Lines changed: 0 additions & 284 deletions
This file was deleted.

main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ static PyObject * PyRunCaCfar(PyCfar *self, PyObject* args) {
9393

9494
merge_save_image(inputImage, boxes_drawn, output_file);
9595

96-
double ratio = boundBoxes.size() / (double) gt_boxes.size();
97-
if (ratio > 2.00 || ratio < 1) {
98-
Py_RETURN_TRUE;
99-
}
96+
// double ratio = boundBoxes.size() / (double) gt_boxes.size();
97+
// if (ratio > 2.00 || ratio < 1) {
98+
// Py_RETURN_TRUE;
99+
// }
100100

101-
Py_RETURN_FALSE;
102-
// return Py_BuildValue("O", build_image_array(outputEroded));
101+
// Py_RETURN_FALSE;
102+
return Py_BuildValue("O", build_image_array(outputEroded));
103103
}
104104

105105

0 commit comments

Comments
 (0)