1b8cbe3f35e385f9a2eaf20c2cf4fcab.png發現一個好用,又是現成的 computer vision libarary, 針對 objection detection 特別方便,一起來玩一下吧~
 
目前感覺上用 ubuntu 比較方便一些,所以我的環境是 ubuntu 18.04
 
  • 安裝 python3
    sudo apt-get install -y python3 python3-distutils
    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    sudo python3 get-pip.py
    pip3 install -U pip
    
  • 安裝相關的函式庫
    pip3 install tensorflow
    pip3 install numpy
    pip3 install scipy
    pip3 install opencv-python
    pip3 install pillow
    pip3 install matplotlib
    pip3 install h5py
    pip3 install keras
    
  • 安裝 ImageAI
    pip3 install https://github.com/OlafenwaMoses/ImageAI/releases/download/2.0.3/imageai-2.0.3-py3-none-any.whl 
    
  • 下載 Pretrained 的檔案 (ResNet50 coco)
    wget https://github.com/OlafenwaMoses/ImageAI/releases/download/1.0/resnet50_coco_best_v2.0.1.h5
     
  • 用 Docker 的方式
    直接寫一個 dockerfiler 如下
    FROM ubuntu:latest
    
    
    RUN apt-get update \
        && apt-get install -y python3 python3-distutils curl wget git \
        && python3 /opt/src/get-pip.py \
        && pip3 install -U pip \
        && ln -s /usr/bin/python3 /usr/bin/python 
    
    
    RUN pip3 install tensorflow \
        && pip3 install numpy \
        && pip3 install scipy \
        && pip3 install opencv-python \
        && pip3 install pillow \
        && pip3 install matplotlib \
        && pip3 install h5py \
        && pip3 install keras \
        && pip3 install https://github.com/OlafenwaMoses/ImageAI/releases/download/2.0.3/imageai-2.0.3-py3-none-any.whl
    
回應
訪客如要回應,請先 登入