-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.htm
282 lines (225 loc) · 10.2 KB
/
index.htm
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<html>
<head>
<link rel="stylesheet" href="res/css/bootstrap-3.3.7.min.css">
<link rel="stylesheet" href="res/css/bootstrap-theme-3.3.7.min.css">
<link rel='stylesheet' href='res/css/style.css' type='text/css' media='all' />
<link rel="stylesheet" href="res/css/magnify.css">
<title>Chester the AI Radiology Assistant</title>
<meta name="viewport" content="width=1100, initial-scale=1.0">
<meta property="og:site_name" content="Chester the AI Radiology Assistant (V3)" />
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://mlmed.org/tools/xray/res/share.jpg" />
<meta name="twitter:card" content="summary"/>
<meta property="og:url" content="https://mlmed.org/tools/xray/" />
<meta property="og:title" content="Chester the AI Radiology Assistant (V3)" />
<meta property="og:description" content="In order to bridge the gap between AI researchers and medical professionals we developed a very accessible free prototype system which can be used by medical professionals to understand the reality of Deep Learning tools for chest X-ray diagnostics. " />
<meta name="title" content="Chester the AI Radiology Assistants">
<meta name="description" content="In order to bridge the gap between AI researchers and medical professionals we developed a very accessible free prototype system which can be used by medical professionals to understand the reality of Deep Learning tools for chest X-ray diagnostics. ">
<script async src="res/js/bootstrap-3.3.7.min.js"></script>
<script async src="res/js/magnify.js"></script>
<script async src="res/js/js-colormaps.js"></script>
<script async src="res/js/ssim.js"></script>
<script src="res/js/jquery-3.5.1.min.js"></script>
<script src="res/js/tf-2.0.1.min.js"></script>
<script>
function showAbout(){
$("#aboutbtn").addClass("active");
$(".about").show();
}
function hideAbout(){
$("#aboutbtn").removeClass("active");
$(".about").hide();
setCookie('about','about',9999);
}
$(function(){
if (findGetParameter("local") != "true" && getCookie("about") != "about"){
showAbout();
}
$("#aboutbtn").click(function(){
if (!$(".about").is(":visible")){
showAbout();
}else{
hideAbout();
}
});
});
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
</script>
<script src="res/js/system.js?v=1.204"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-131584004-1', 'mlmed.org');
ga('send', 'pageview');
</script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- <a class="navbar-brand" href="#"><img src="res/dr-convnet-icon.png"/></a> -->
<a class="navbar-brand" href="#">Chester the AI Radiology Assistant</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
</ul>
</div>
</div>
</nav>
<div class="container" style="width: 100%;min-width: 1024px;">
<div class="col-sm-12" style="">
<div class="col-md-2"></div>
<div class="col-md-8">
</div>
</div>
<div class="col-sm-12">
<div class="alert alert-warning" role="alert" style="width: 100%">
<center>
<!-- NOT FOR MEDICAL USE. This is a prototype system for diagnosing
chest x-rays using neural networks. All processing is done on your
device and images are not sent to the server. If you continue you
assume all liability when using the system. <span class="hideiflocal">A neural network model
(~150mb) will be downloaded to your browser.</span> -->
<button id="agree" type="button" class="btn btn-danger">Accept NOT FOR MEDICAL USE</button>
</center>
</div>
<div class="col-sm-12">
<div id="file-container" style="display: none">
Process an image locally: <input type="file" id="files" name="files[]" multiple>
<span class="hideiflocal"><a target="_blank" href="examples/">Download example files (opens new window)</a><br></span>
<a href="javascript:downloadCSV();">Download all predictions as CSV</a>
</div>
</div>
<div class="col-sm-12">
<span id="info" style="color:red"></span>
<center><div id="status" class="status"></div></center>
</div>
</div>
<div id="predictions">
<div id="predtemplate" class="prediction col-xs-12" style="display:none">
<div class="topbar">
<center><span class="imagename"> </span></center>
</div>
<div class="col-xs-12" style="padding:0px;margin-bottom: 10px">
<div class="col-xs-8">
<!-- <center style=""><b>Image</b> -->
<center>
<div class="toolbar btn-group">
<button class="btn btn-default btn-invert-colors" data-original-title="Invert colors">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-circle-half" fill="currentColor" xmlns="http:https://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M8 15V1a7 7 0 1 1 0 14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"/>
</svg> Invert colors
</button>
<button class="btn btn-default btn-raw-gradients" data-original-title="raw gradients">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-cpu" fill="currentColor" xmlns="http:https://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M5 0a.5.5 0 0 1 .5.5V2h1V.5a.5.5 0 0 1 1 0V2h1V.5a.5.5 0 0 1 1 0V2h1V.5a.5.5 0 0 1 1 0V2A2.5 2.5 0 0 1 14 4.5h1.5a.5.5 0 0 1 0 1H14v1h1.5a.5.5 0 0 1 0 1H14v1h1.5a.5.5 0 0 1 0 1H14v1h1.5a.5.5 0 0 1 0 1H14a2.5 2.5 0 0 1-2.5 2.5v1.5a.5.5 0 0 1-1 0V14h-1v1.5a.5.5 0 0 1-1 0V14h-1v1.5a.5.5 0 0 1-1 0V14h-1v1.5a.5.5 0 0 1-1 0V14A2.5 2.5 0 0 1 2 11.5H.5a.5.5 0 0 1 0-1H2v-1H.5a.5.5 0 0 1 0-1H2v-1H.5a.5.5 0 0 1 0-1H2v-1H.5a.5.5 0 0 1 0-1H2A2.5 2.5 0 0 1 4.5 2V.5A.5.5 0 0 1 5 0zm-.5 3A1.5 1.5 0 0 0 3 4.5v7A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 11.5 3h-7zM5 6.5A1.5 1.5 0 0 1 6.5 5h3A1.5 1.5 0 0 1 11 6.5v3A1.5 1.5 0 0 1 9.5 11h-3A1.5 1.5 0 0 1 5 9.5v-3zM6.5 6a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z"/>
</svg> Raw Gradients
</button>
<button class="btn btn-default btn-reset-layers" data-original-title="reset layers">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-layers" fill="currentColor" xmlns="http:https://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M3.188 8L.264 9.559a.5.5 0 0 0 0 .882l7.5 4a.5.5 0 0 0 .47 0l7.5-4a.5.5 0 0 0 0-.882L12.813 8l-1.063.567L14.438 10 8 13.433 1.562 10 4.25 8.567 3.187 8z"/>
<path fill-rule="evenodd" d="M7.765 1.559a.5.5 0 0 1 .47 0l7.5 4a.5.5 0 0 1 0 .882l-7.5 4a.5.5 0 0 1-.47 0l-7.5-4a.5.5 0 0 1 0-.882l7.5-4zM1.563 6L8 9.433 14.438 6 8 2.567 1.562 6z"/>
</svg> Reset layers
</button>
</div>
</center>
</div>
<div class="col-xs-4">
<center style=""><b>Pathology Risk</b>
<br><span style="font-size: x-small">The white center region indicates that the model is not sure.</span>
</center>
</div>
</div>
<div class="col-xs-8" style="">
<div class="viewbox">
<canvas class="layer inputimage_highres baselayer"></canvas>
<canvas class="layer inputimage" style="display:none;"></canvas>
<canvas class="layer inputimage_rec" style="display:none;"></canvas>
<canvas class="layer recimage" style="display:none;"></canvas>
<canvas class="layer oodimage" style="opacity: 0.5;display:none;"></canvas>
<canvas class="layer gradimage" style="filter:blur(0.89rem)"></canvas>
<center class="layer loading" style="display:none;margin-top:5%;width:100%;"><img style="width:400px;" alt="Loading..." src="res/loading1.gif"/></center>
</div>
<center><span class="desc"></span></center>
</span>
<center>
<button style="display:none" type="button" class="oodtoggle btn btn-danger btn-xs">
Show OOD heatmap
</button>
</center>
<!-- <center><div style="margin-top:40%;display:none" class="computegrads"></div></center> -->
</div>
<div class="col-xs-4 predviz">
<center class="loading"><img style="margin-top:40%;" alt="Loading..." src="https://i.imgur.com/yoS0cXm.gif"/></center>
<center>
<div class="predbox" style="width:100%">
</div>
</center>
</div>
</div>
<hr>
</div>
</div>
<img id="defaultImage" src="examples/f410057190635755d60158d1595d67_jumbo-1.jpeg" style="display:none" />
</div>
</body>
<canvas id="zoom" width="100" height="50" style="width:400px; height:200px;position:absolute; top:0; left:0; display:none;image-rendering:pixelated"></canvas>
<script>
let statusElement;
let status;
$(function(){
statusElement = document.getElementById('status');
status = function(msg){statusElement.innerText = msg;console.log("Status: " + msg)};
});
$(function(){
testBrowser();
$("#agree").click(function(){
$("#agree").hide()
run();
});
if (findGetParameter("accept") == "true"){
$("#agree").hide()
hideAbout()
run();
}
});
function testBrowser(){
try{
new Promise(function(resolve){setTimeout(resolve, 1)});
}catch(err) {
status("Error! Your browser may be unsupported. (" + err.message + ")");
console.log(err)
}
}
</script>
<br>
</html>