An extended version of the great jupyter/datascience-notebook project with OpenCV
565
This GitHub is associated with the following automated build on Dockerhub : dash00/datascience-notebook-opencv
Enjoy this very easy and very quick way to setup a full datascience environment! As you will see in the following sections, you will be able to install all popular libraries and packages to play with data with only one command line.
I had to setup a complete environment to practice image analysis based Machine Learning. I found very great ones but I was not able to find one which includes OpenCV which is very usefull to extract features from the images. Thus I decided to build my own ;)
The full datascience environment will be installed into a Docker container. Thus everything will be isolated and your system installation will not be impacted. When you run the container (as described below), a web service will be available and you will have an access through your web browser, that's it !
There are only three steps
This container inherit from the excellent jupyter/datascience-notebook docker image wich already includes
Here I simply add the following (based on the izumin5210/notebook-dockerfiles dockerfile) :
You can either rebuild the image with the attached Dockerfile or pull the last build of the image from DockerHub (most straightforward):
docker run -d -p 8888:8888 -v /$(pwd)/notebooks:/notebooks dash00/datascience-notebook-opencv
then add your notebooks into /$(pwd)/notebooks and got to the web interface at localhost:8888
Options used :
-d run the container in background-p <PORT>:8888 choose wich public port to expose, should not be already in use. the service will be available at localhost:<PORT>-v <SHARED>:/notebooks share a folder with the container, will be created if it does not existdocker build -t my-own-datascience-notebook-opencv .
Option used : -t set the name of the image.
docker run -d -p 8888:8888 -v /$(pwd)/notebooks:/notebooks my-own-datascience-notebook-opencv
(see previous subsection for more info on this command line)
In order to test the correct installation of OpenCV, create a new notebook and copy, paste and run that code :
%matplotlib inline
import cv2
import numpy as np
import matplotlib.pyplot as plt
img = cv2.imread('/notebooks/6683784.jpeg')
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
plt.imshow(img)
Content type
Image
Digest
Size
1.9 GB
Last updated
about 10 years ago
docker pull dash00/datascience-notebook-opencv