This is a guide on how to install Caffe for Ubuntu 16.04 and above, without GPU support (No CUDA required).
sudo apt-get install libopencv-dev python-opencv
| FROM ubuntu:18.04 | |
| RUN apt-get update \ | |
| && apt-get install -y apt-utils \ | |
| python3.8 \ | |
| python3-pip \ | |
| libgl1-mesa-glx \ | |
| nano | |
| WORKDIR /app |
| from preprocess.normalize import normalize_image, resize_image, crop_center, preprocess_signature | |
| import tensorflow.contrib.slim as slim | |
| import skimage.transform | |
| import tensorflow as tf | |
| import skimage.data | |
| import numpy as np | |
| import glob | |
| import cv2 | |
| import os |
| #include <memory.h> | |
| #include "DESolver.h" | |
| #define Element(a,b,c) a[b*nDim+c] | |
| #define RowVector(a,b) (&a[b*nDim]) | |
| #define CopyVector(a,b) memcpy((a),(b),nDim*sizeof(double)) | |
| DESolver::DESolver(int dim,int popSize) : | |
| nDim(dim), nPop(popSize), | |
| generations(0), strategy(stRand1Exp), |