justadudewhohacks / opencv-express Goto Github PK
View Code? Open in Web Editor NEWTemplate for using opencv-3.4.1 + opencv-contrib with express.js and docker
License: MIT License
Template for using opencv-3.4.1 + opencv-contrib with express.js and docker
License: MIT License
Hi,
I'm new to all nodejs stuff, and I need help with opencv-express demo pls.
I've tried with Node 8.x, then cleaned all up (hard delete) and tried this:
395 brew reinstall node@6
396 ls
397 ######### rm -rf opencv-express/ object-tracking/
398 npm install --save opencv4nodejs
399 git clone https://github.com/justadudewhohacks/opencv-express.git
400 cd opencv-express/
401 docker-compose build
402 history
I've put the output in:
opencv-express docker build fail.log
Could you please have a look?
I've searched a bit the internet why it fails, and it appears 'node-gyp' need a file in your repository: binding.gyp
Maybe it's that, maybe it not...
Thanks and looking forward to see some visuals of your work ;)
I managed to make it work on a Raspberry pi using this Dockerfile..
FROM mohaseeb/raspberrypi3-python-opencv:3.4.1
ENV OPENCV4NODEJS_DISABLE_AUTOBUILD=1
RUN curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash - && sudo apt install -y nodejs
WORKDIR /app
COPY ./package.json /app/package.json
RUN npm install -g nodemon && npm install
COPY ./src /app/src
CMD ["nodemon", "-L", "./src/server.js"]
I tried to do the same process as specified using docker.
->did a docker pull
->docker-compose build
->docker-compose up
-> It shows that it is listening to a port 3000 via node mon in the console but my localhost:3000 doesnt work
Dont know why.
I did a docker inspect container id
docker inspect opencvexpress_cv_1
then I got all the network info but the host ip has no value but the host port has 3000 as value
How can I fix this issue
Hi,
I tried to do the same process as specified using docker.
->did a docker pull
->docker-compose build
->docker-compose up
The app doesn't start. listening to a port 3000
doesn't show up. The vm config is:
Ram: 16GB
Processor: 4CPUs
This is all I get in the console:
$ docker-compose up
Creating opencvexpress_cv_1 ... done
Attaching to opencvexpress_cv_1
cv_1 | [nodemon] 1.18.4
cv_1 | [nodemon] to restart at any time, enter `rs`
cv_1 | [nodemon] watching: *.*
cv_1 | [nodemon] starting `node ./src/server.js`
Please help @justadudewhohacks
Please let me know if any more details are required. Thanks!
I've pulled down the most recent docker image and face detection is failing.
Environment:
$ docker-compose --version
docker-compose version 1.18.0, build 8dd22a9
$docker info
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 34
Server Version: 17.12.1-ce
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 40
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9b55aab90508bd389d7654c4baf173a981477d55
runc version: 9f9c96235cc97674e935002fc3d78361b696a69e
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.4.119-boot2docker
Operating System: Boot2Docker 17.12.1-ce (TCL 8.2.1); HEAD : 42357fc - Wed Feb 28 17:52:00 UTC 2018
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.8MiB
Name: default
ID: GTCT:I2KZ:KRRD:WYEG:LWM6:SB5I:PMTS:3PO2:RBC2:Y6HS:NAPN:WH2Y
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 40
Goroutines: 57
System Time: 2018-03-13T20:15:13.959656714Z
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
127.0.0.0/8
Steps to recreate
Error reprorted
cv_1 | Error: Mat::DrawRectangle - Error: expected argument 3 to be of type int
cv_1 | at Error (native)
cv_1 | at detection.objects.forEach (/app/src/services/faceDetection.js:15:14)
cv_1 | at Array.forEach (native)
cv_1 | at Object.module.exports [as detectFaces] (/app/src/services/faceDetection.js:13:21)
cv_1 | at app.post (/app/src/server.js:26:29)
cv_1 | at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
cv_1 | at next (/app/node_modules/express/lib/router/route.js:137:13)
cv_1 | at requiresImgBase64 (/app/src/server.js:22:10)
cv_1 | at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
cv_1 | at next (/app/node_modules/express/lib/router/route.js:137:13)```
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.