chaosmail / caffejs Goto Github PK
View Code? Open in Web Editor NEWRun Caffe models in the browser using ConvNetJS
Home Page: https://chaosmail.github.io/caffejs/
License: MIT License
Run Caffe models in the browser using ConvNetJS
Home Page: https://chaosmail.github.io/caffejs/
License: MIT License
hi, when I run convert_caffemodel.py to load weight from bvlc_googlenet.caffemodel I get No module named fs..thank you.
Hi Christof: could you kindly check your AlexNet weights, and repost? When I fetch and unzip (linux) the weights.zip file, it reports an error (unspecified).
When I run AlexNet,
function loadModel() {
model = new Net.CaffeModel(
//GoogLeNet:
//'models/bvlc_googlenet/deploy.prototxt',
//'models/bvlc_googlenet/weights/'
//AlexNet:
'models/bvlc_alexnet/deploy.prototxt',
'models/bvlc_alexnet/weights/'
);
I get the same classifications, regardless of the webcam capture:
indigo bunting, indigo finch, indigo bird, Passerina cyanea
tench, Tinca tinca
mountain bike, all-terrain bike, off-roader
mixing bowl
mobile home, manufactured home
Thanks, appreciated!
[victoria@victoria weights]$ unzip -K weights.zip
Archive: weights.zip
warning: stripped absolute path spec from /
mapname: conversion of failed
inflating: fc8_filter.bin
inflating: fc7_bias.bin
inflating: conv2_filter.bin
inflating: conv5_filter.bin
inflating: conv1_filter.bin
inflating: conv2_bias.bin
inflating: conv4_bias.bin
inflating: fc7_filter.bin
inflating: conv5_bias.bin
inflating: conv3_bias.bin
inflating: conv1_bias.bin
inflating: conv3_filter.bin
inflating: fc8_bias.bin
inflating: conv4_filter.bin
inflating: fc6_bias.bin
inflating: fc6_filter.bin
[victoria@victoria weights]$ l
total 449M
-rwxr--r-- 1 victoria victoria 384 Jul 15 16:59 conv1_bias.bin
-rwxr--r-- 1 victoria victoria 137K Jul 15 16:59 conv1_filter.bin
-rwxr--r-- 1 victoria victoria 1.0K Jul 15 16:59 conv2_bias.bin
-rwxr--r-- 1 victoria victoria 1.2M Jul 15 16:59 conv2_filter.bin
-rwxr--r-- 1 victoria victoria 1.5K Jul 15 16:59 conv3_bias.bin
-rwxr--r-- 1 victoria victoria 3.4M Jul 15 16:59 conv3_filter.bin
-rwxr--r-- 1 victoria victoria 1.5K Jul 15 16:59 conv4_bias.bin
-rwxr--r-- 1 victoria victoria 2.6M Jul 15 16:59 conv4_filter.bin
-rwxr--r-- 1 victoria victoria 1.0K Jul 15 16:59 conv5_bias.bin
-rwxr--r-- 1 victoria victoria 1.7M Jul 15 16:59 conv5_filter.bin
-rwxr--r-- 1 victoria victoria 16K Jul 15 16:59 fc6_bias.bin
-rwxr--r-- 1 victoria victoria 144M Jul 15 16:59 fc6_filter.bin
-rwxr--r-- 1 victoria victoria 16K Jul 15 16:59 fc7_bias.bin
-rwxr--r-- 1 victoria victoria 64M Jul 15 16:59 fc7_filter.bin
-rwxr--r-- 1 victoria victoria 4.0K Jul 15 16:59 fc8_bias.bin
-rwxr--r-- 1 victoria victoria 16M Jul 15 16:59 fc8_filter.bin
-rw-r--r-- 1 victoria victoria 217M Jan 3 14:24 weights.zip
[victoria@victoria weights]$
When I run npm start, I get this:
[email protected] start /home/andreas/software/caffejs
cd docs-pages && http-serversh: 1: cd: can't cd to docs-pages
And when I run npm install, I get this:
typings install
typings WARN deprecated 5/9/2016: "registry:dt/dagre#0.7.0+20160505164908" is deprecated (updated, replaced or removed)
typings WARN deprecated 9/6/2016: "registry:dt/d3#0.0.0+20160620220125" is deprecated (updated, replaced or removed)
typings WARN deprecated 10/4/2016: "registry:dt/whatwg-fetch#0.0.0+20160524142046" is deprecated (updated, replaced or removed)
SqueezeNet is a tiny model and great for DL in the browser.
Source: https://github.com/DeepScale/SqueezeNet
Unittest are necessary to garuantee that future commits wont break existing functionality. Hence we need to add unittests (e.g. karma and jasmine) as well as a travis file for automatically runnning the tests on every PR.
It would be great to switch between micro and macro architecture when exploring the model graph
Fix the documentation concerning dataset guidelines (we now use the imagenet urls directly).
Currently, we are using D3 version 3. We should consider upgrading to v4 and only selectively add packages that are needed.
I have the pretrained model,
/mnt/Vancouver/apps/caffejs/docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodel
/mnt/Vancouver/apps/caffejs/docs/assets/models/bvlc_googlenet/deploy.prototxt
and everything appears to be good but I cannot get the model loaded/running ... :-/
(py27) [victoria@victoria caffejs]$ node node_modules/.bin/http-server
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
http://192.168.1.4:8080
http://10.1.10.10:8080
Hit CTRL-C to stop the server
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/webcam.html" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/libs/material.min.css" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/libs/material.min.js" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/styles/docs.css" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/libs/webcam.min.js" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/libs/d3.min.js" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/dist/caffe.js" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/libs/lodash.min.js" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/libs/graphlib.core.min.js" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/libs/dagre.core.min.js" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/libs/dagre-d3.core.min.js" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:05 GMT-0800 (PST)] "GET /docs/assets/styles/graph.css" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/data/ilsvrc12/synset_words.txt" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/deploy.prototxt" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv1/7x7_s2_filter.bin" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv1/7x7_s2_filter.bin" Error (404): "Not found"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv1/7x7_s2_bias.bin" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv2/3x3_reduce_filter.bin" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv2/3x3_reduce_bias.bin" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv2/3x3_filter.bin" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv2/3x3_bias.bin" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv1/7x7_s2_bias.bin" Error (404): "Not found"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv2/3x3_reduce_filter.bin" Error (404): "Not found"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv2/3x3_reduce_bias.bin" Error (404): "Not found"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv2/3x3_filter.bin" Error (404): "Not found"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelconv2/3x3_bias.bin" Error (404): "Not found"
[Mon Dec 12 2016 18:08:06 GMT-0800 (PST)] "GET /docs/assets/models/bvlc_googlenet/bvlc_googlenet.caffemodelinception_3a/1x1_filter.bin" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[ ... SNIP! ... ]
.. and I don't see any images in the layers (outputs) ...
Got this error, while tried to run DeepDream thing in two browsers (Opera & Chrome)..
Uncaught (in promise) ReferenceError: prototxtParser is not defined
at PrototxtParser.parseString (caffe.js:6029)
at caffe.js:2054
The demos of JS libraries using weblas (http://waylonflinn.github.io/DeepBeliefSDK/, https://transcranial.github.io/keras-js/) look amazing. Hence we should integrate it for GPU support (https://github.com/waylonflinn/weblas).
CaffeJS enables running caffe models in browser, but any specific browser dependency should be removed. It should only be javascript specific. It would mean removing dependency on canvas and webcamjs. ImgJS could only receive binary array of image, relying on caffeJS-UI library to provide image from webcam and transform it into binary format. What do you think about it?
Currently the link to the Squeezenet paper is not working - we should fix this!
It would be cool to play directly with the model structure in CaffeJS
seriously, 1x1 px filters are super small
Would be also nice to display the activations in the model graph directly
Currently the library uses an old typescript version. We should upgrade to TS 2.5 and upgrade typings to npm types.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.