-
-
Save hpssjellis/05af4e9e3e11f6e38b40b412926fa7cc to your computer and use it in GitHub Desktop.
Revisions
-
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ but then how to re-activate the script. It does not seem to have a way to call i <input id="myFile" type=file size=100 onchange="{ document.getElementById('cat').onload = function() { context.drawImage(document.getElementById('cat'), 400, 400); }; document.getElementById('cat').crossOrigin = 'Use-Credentials'; document.getElementById('myFile01').value = this.value @@ -42,24 +42,5 @@ but then how to re-activate the script. It does not seem to have a way to call i <div id="myDivOut">...</div> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,7 +50,7 @@ but then how to re-activate the script. It does not seem to have a way to call i <script> var context = document.getElementById('canvas1').getContext("2d"); @@ -60,6 +60,6 @@ img.onload = function () { } img.src = "https://www.what-dog.net/Images/faces2/scroll001.jpg"; </script> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,3 +47,19 @@ but then how to re-activate the script. It does not seem to have a way to call i document.getElementById('cat').outerHTML = '<img id=\'cat\' src=\'https://www.what-dog.net/Images/faces2/scroll001.jpg\' width=227 height=227 crossorigin >' }"> var context = document.getElementById('canvas1').getContext("2d"); var img = new Image(); img.onload = function () { context.drawImage(img, 0, 0); } img.src = "https://www.what-dog.net/Images/faces2/scroll001.jpg"; -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ but then how to re-activate the script. It does not seem to have a way to call i <script src='https://unpkg.com/deeplearn-squeezenet'></script> <img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' width=227 height=227 crossorigin ><br><br> <input id="myFile" type=file size=100 onchange="{ document.getElementById('cat').onload = function() { context.drawImage(document.getElementById('cat').img, 400, 400); -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,9 @@ but then how to re-activate the script. It does not seem to have a way to call i <img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' width=227 height=227 crossorigin ><br><br> use <input id="myFile" type=file size=100 onchange="{ document.getElementById('cat').onload = function() { context.drawImage(document.getElementById('cat').img, 400, 400); }; document.getElementById('cat').crossOrigin = 'Use-Credentials'; document.getElementById('myFile01').value = this.value document.getElementById('cat').src = this.value -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,10 +11,12 @@ but then how to re-activate the script. It does not seem to have a way to call i <script src='https://unpkg.com/deeplearn-squeezenet'></script> <img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' width=227 height=227 crossorigin ><br><br> use <input id="myFile" type=file size=100 onchange="{ document.getElementById('cat').crossOrigin = 'Use-Credentials'; document.getElementById('myFile01').value = this.value document.getElementById('cat').src = this.value }"> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,7 @@ but then how to re-activate the script. It does not seem to have a way to call i <input id="myFile" type=file size=100 onchange="{ document.getElementById('myFile01').value = this.value document.getElementById('cat').src = this.value }"> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,10 +9,13 @@ but then how to re-activate the script. It does not seem to have a way to call i <script src='https://unpkg.com/deeplearn-squeezenet'></script> <img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' width=227 height=227 crossorigin ><br><br> <input id="myFile" type=file size=100 onchange="{ document.getElementById('myFile01').value = this.value }"> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,10 +9,10 @@ but then how to re-activate the script. It does not seem to have a way to call i <script src='https://unpkg.com/deeplearn-squeezenet'></script> try <img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' width=227 height=227 crossorigin ><br><br> <input id="myFile" type=file size=100 onclick="this.value = null;" onchange="{alert(this.value)}"> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ but then how to re-activate the script. It does not seem to have a way to call i <img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' width=227 height=227 crossorigin ><br><br> <input id="myFile" type=file size=100 onclick="this.value = null;" onchange="{alert(this.value)}"> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,15 +8,15 @@ https://www.what-dog.net/Images/faces2/scroll001.jpg <br> but then how to re-activate the script. It does not seem to have a way to call it<br> <script src='https://unpkg.com/deeplearn-squeezenet'></script> <img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' width=227 height=227 crossorigin ><br><br> <input id="myFile" type=file size=100 onchange="{alert()}"> <input id="myFile01" type=text size=100 value='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' onChange="{ -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,6 +36,6 @@ but then how to re-activate the script. It does not seem to have a way to call i <div id="myDivOut">...</div> <input type=button value=try onclick="{ document.getElementById('myDivOut').innerHTML = '' // clear the div document.getElementById('cat').outerHTML = '<img id=\'cat\' src=\'https://www.what-dog.net/Images/faces2/scroll001.jpg\' width=227 height=227 crossorigin >' }"> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,6 +35,7 @@ but then how to re-activate the script. It does not seem to have a way to call i <div id="myDivOut">...</div> <input type=button value=try onclick="{ document.getElementById('myDivOut').innerHTML = '' // clear the div document.getElementById('cat').outerHTML = '<img id='cat' src='https://www.what-dog.net/Images/faces2/scroll001.jpg' width=227 height=227 crossorigin >' }"> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 0 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,4 @@ const catImage = document.getElementById('cat'); const math = new dl.NDArrayMathGPU(); const squeezeNet = new squeezenet.SqueezeNet(math); @@ -16,8 +13,3 @@ for (const className in topClassesToProbs) { document.getElementById('myDivOut').innerHTML += topClassesToProbs[className].toFixed(5) + ' : '+ className + '<br>' } -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,5 +16,8 @@ for (const className in topClassesToProbs) { document.getElementById('myDivOut').innerHTML += topClassesToProbs[className].toFixed(5) + ' : '+ className + '<br>' } } function nothing(){ // closes the final bracket -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ // finishes the async function } async function myCall(){ const catImage = document.getElementById('cat'); @@ -13,4 +15,6 @@ document.getElementById('myDivOut').innerHTML = '' // clear the div for (const className in topClassesToProbs) { document.getElementById('myDivOut').innerHTML += topClassesToProbs[className].toFixed(5) + ' : '+ className + '<br>' } function nothing(){ // closes the final bracket -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ async function myCall(){ const catImage = document.getElementById('cat'); const math = new dl.NDArrayMathGPU(); const squeezeNet = new squeezenet.SqueezeNet(math); -
hpssjellis revised this gist
Nov 15, 2017 . 2 changed files with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,4 +34,7 @@ but then how to re-activate the script. It does not seem to have a way to call i <div id="myDivOut">...</div> <input type=button value=try onclick="{ myCall() }"> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ function myCall(){ const catImage = document.getElementById('cat'); const math = new dl.NDArrayMathGPU(); const squeezeNet = new squeezenet.SqueezeNet(math); @@ -10,4 +12,5 @@ const topClassesToProbs = await squeezeNet.getTopKClasses(inferenceResult.logits document.getElementById('myDivOut').innerHTML = '' // clear the div for (const className in topClassesToProbs) { document.getElementById('myDivOut').innerHTML += topClassesToProbs[className].toFixed(5) + ' : '+ className + '<br>' } } -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,9 @@ Trying to dynamically load an image but running into corssorigin issues. Have had some suuccess with <br> //https://crossorigin.me/your-URL<br><br> https://www.what-dog.net/Images/faces2/scroll001.jpg <br> but then how to re-activate the script. It does not seem to have a way to call it<br> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,13 @@ <h1 align=center>SqueezeNet Cat Demo</h1> Trying to dynamically load an image but running into corssorigin issues. Have had some suuccess with <br> //https://crossorigin.me/your-URL<br><br> https://www.what-dog.net/Images/faces2/scroll001.jpg -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 8 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,10 +12,14 @@ Have had some suuccess with <br> <input id="myFile01" type=text size=100 value='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' onChange="{ // document.getElementById('cat').onload = function() { // context.drawImage(this, 40, 40); //}; // document.getElementById('cat').crossOrigin = 'Anonymous'; document.getElementById('cat').crossOrigin = 'Use-Credentials'; document.getElementById('cat').src = this.value document.getElementById('myDivOut').innerHTML = '' // clear the div }"><br><br> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,9 @@ Have had some suuccess with <br> <input id="myFile01" type=text size=100 value='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' onChange="{ document.getElementById('cat').onload = function() { context.drawImage(this, 40, 40); }; document.getElementById('cat').crossOrigin = 'Anonymous'; document.getElementById('cat').src = this.value document.getElementById('myDivOut').innerHTML = '' // clear the div -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,9 @@ <h1 align=center>SqueezeNet Cat Demo</h1> Trying to dynamically load an image but running into corssorigin issues. Have had some suuccess with <br> //https://crossorigin.me/your-URL<br> <script src='https://unpkg.com/deeplearn-squeezenet'></script> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ <input id="myFile01" type=text size=100 value='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' onChange="{ document.getElementById('cat').crossOrigin = 'Anonymous'; document.getElementById('cat').src = this.value document.getElementById('myDivOut').innerHTML = '' // clear the div }"><br><br> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,8 +7,8 @@ <input id="myFile01" type=text size=100 value='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' onChange="{ document.getElementById('cat').crossOrigin = "Anonymous"; document.getElementById('cat').src = this.value document.getElementById('myDivOut').innerHTML = '' // clear the div }"><br><br> -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,7 @@ <input id="myFile01" type=text size=100 value='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' onChange="{ document.getElementById('cat').src = this.value document.getElementById('cat').crossOrigin = "Anonymous"; document.getElementById('myDivOut').innerHTML = '' // clear the div }"><br><br> -
hpssjellis revised this gist
Nov 15, 2017 . 2 changed files with 1 addition and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,7 @@ <script src='https://unpkg.com/deeplearn-squeezenet'></script> <img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' width=227 height=227 crossorigin ><br><br> <input id="myFile01" type=text size=100 value='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' onChange="{ -
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ sf -
hpssjellis revised this gist
Nov 15, 2017 . No changes.There are no files selected for viewing
-
hpssjellis revised this gist
Nov 15, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const image = dl.Array3D.fromPixels(catImage); const inferenceResult = await squeezeNet.predict(image); const topClassesToProbs = await squeezeNet.getTopKClasses(inferenceResult.logits, 10); document.getElementById('myDivOut').innerHTML = '' // clear the div for (const className in topClassesToProbs) { document.getElementById('myDivOut').innerHTML += topClassesToProbs[className].toFixed(5) + ' : '+ className + '<br>' }
NewerOlder