-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup_doc.html
159 lines (135 loc) · 5.93 KB
/
setup_doc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html lang="en">
<!-- head starts-->
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-129453432-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-129453432-1');
</script>
<!-- Title Displayed on Tab on Browser-->
<title>Setup Docs - ICEBERG</title>
<link rel="shortcut icon" type="image/png" href="img/logo/iceberg.png"/>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="css/custom.css" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/default.min.css">
</head>
<!-- head ends-->
<!-- body starts-->
<body>
<div id="header_nav"></div>
<!-- Home Page starts -->
<div class="container" id="body" hidden>
<!-- heading starts -->
<div class="container row">
<h2 class="colorDarkBlue">Setup Docs</h2>
</div>
<!-- heading ends -->
<!-- Introductory starts -->
<div class="container row">
<p class="text-justify">
In this section we share the documents and steps required to setup a local version of our projects.
</p>
</div>
<!-- Introductory ends -->
<hr/>
<div class="container row marginBottom-16">
<h3>Useful links</h3>
<div class="container row">
<a href="https://radicalpilot.readthedocs.io/en/latest/" target="_blank">RADICAL-Pilot</a>
</div>
<div class="container row">
<a href="https://www.xsede.org/" target="_blank">XSEDE</a>
</div>
<div class="container row">
<a href="https://github.com/iceberg-project/" target="_blank">ICEBERG github repository</a>
</div>
</div>
<hr/>
<div class="container row marginBottom-16">
<h3>Deployment Notebooks</h3>
<p>This jupyter allows you to make predictions on your own images with the seal detection pipeline.</p>
<p> WARNING : CNNs used here were trained on panchromatic WorldView-3 imagery so results may not be satisfactory on different imagery / color bands.</p>
<h4>Load Packages</h4>
<div class="container row card bg-light marginBottom-16">
<!-- CODE STARTS: Dont give spaces/tabs before code lines -->
<pre><code class="python">
import os
</code></pre>
<!-- CODE ENDS: Dont give spaces/tabs before code lines -->
</div>
<h4>Call detection pipeline</h4>
<p>Though you are free to try different combinations, the current setup of CNNs provides the best results on our test images.</p>
<div class="container row card bg-light marginBottom-16">
<!-- CODE STARTS: Dont give spaces/tabs before code lines -->
<pre><code class="python">
# select classification CNN and hyperparameter set
cls_arch = 'NasnetA'
hyp_cls = 'E'
t_dir = 'training_set_binary'
if t_dir.split('_')[-1] == 'binary':
pos_classes = 'seal'
else:
pos_classes = 'crabeater_weddell_pack-ice_ice-sheet_crack'
# whether we want to skip classification
skip = 1
# select counting / detection CNN and hyperparameter set
det_arch = 'UnetDet'
hyp_cnt = 'B'
# setup input folder ** change here **
inp_fldr = './test_scenes'
# setup output folder ** change here **
out_fldr = 'sealnet_predictions_test'
# loop through images
inp_imgs = [img for img in os.listdir('{}'.format(inp_fldr)) if img[-4:] == '.tif']
for img in inp_imgs:
img_path = '{}/{}'.format(inp_fldr, img)
# call pipeline
!python predict_raster_det.py --input_image=$img_path \
--class_architecture=$cls_arch --det_architecture=$det_arch \
--hyperparameter_set_class=$hyp_cls --hyperparameter_set_count=$hyp_cnt \
--training_dir=$t_dir --dest_folder=$out_fldr \
--pos_classes=$pos_classes --skip_class=$skip
</code></pre>
<!-- CODE ENDS: Dont give spaces/tabs before code lines -->
</div>
<p>The output after running the above should look like this -</p>
<div class="container row card bg-light marginBottom-16">
<!-- CODE STARTS: Dont give spaces/tabs before code lines -->
<pre><code class="python">
4536 tiles created in 0 minutes and 16.42 seconds
Predicting with sealnet_predictions_test:
Testing complete in 0.0h 2m 23s
Total predicted in test.tif: 227
</code></pre>
<!-- CODE ENDS: Dont give spaces/tabs before code lines -->
</div>
</div>
<div class="container row">
Seals iPython Notebook
<iframe id="inlineFrameExample" title="Inline Frame Example" height="1220" width="900"
src="deploy_sealnet.html">
</iframe>
</div>
</div>
<!-- Home Page ends -->
<div id="footer"></div>
<!-- This should be at the end of the body tag -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
<script src="js/custom.js"></script>
<script src="js/news.js"></script>
</body>
<!-- body ends-->
</html>