# Turi Create

## **Python 環境設定**

* [**在 Mac 上架設 Jupyter Notebook 環境**](https://medium.com/@atimis19/%E5%9C%A8-mac-%E4%B8%8A%E6%9E%B6%E8%A8%AD-jupiter-notebook-%E7%92%B0%E5%A2%83-4a983b70af4)
  * 使用 turi create 前，先設定好 Jupyter Notebook 環境
* [**轉換 Jupyter(.ipynb) to Python(.py)**](https://medium.com/@researchplex/the-easiest-way-to-convert-jupyter-ipynb-to-python-py-912e39f16917)

## Turi Create

* [**A Guide to Turi Create - WWDC2018**](https://developer.apple.com/videos/play/wwdc2018/712/)
* [**WWDC18, Session-712 Turi Create 重點整理**](https://medium.com/@atimis19/overview-of-wwdc18-session-712-turi-create-build-an-app-with-core-ml-is-not-that-difficult-a46cb9420b34)
* [**使用 Turi Create 製作圖案辨識的 App - Core ML and Vision**](https://medium.com/@atimis19/using-turi-create-build-an-image-classification-app-core-ml-b3071ffde3af)
* [**Object Detection**](https://apple.github.io/turicreate/docs/userguide/object_detection/)
  * model 將識別目標物的 label 、大小及坐標

    ![](https://apple.github.io/turicreate/docs/userguide/object_detection/images/ground_truth.jpg)

    ```javascript
    [{'coordinates': {'height': 104, 'width': 110, 'x': 115, 'y': 216},
    'label': 'ball'},
    {'coordinates': {'height': 106, 'width': 110, 'x': 188, 'y': 254},
    'label': 'ball'},
    {'coordinates': {'height': 164, 'width': 131, 'x': 374, 'y': 169},
    'label': 'cup'}]
    ```
* **利用合成的技巧，用少量的素材產生大量的圖資供 model 訓練用**
  * [**Python : 用 PIL 做影像處理(合成)**](https://medium.com/@Syashin/python-%E7%85%A7%E7%89%87-%E7%B0%BD%E5%90%8D%E6%AA%94%E5%9C%96%E7%89%87%E5%90%88%E6%88%90%E5%B7%A5%E5%85%B7-e4df88f99994)
  * [**Python: 圖像的縮放、旋轉與翻轉**](https://blog.csdn.net/guduruyu/article/details/70842142)

    ```python
      from PIL import Image

      # 讀取圖像 
      im = Image.open("lenna.jpg"
      im.show()

      #  放為 128x128
      im_resized = im.resize((128, 128))
      im_resized.show()

      # 旋轉
      im_rotate = im.rotate(45) 
      im_rotate.show()

      # 翻轉
      out = im.transpose(Image.FLIP_LEFT_RIGHT)
      out = im.transpose(Image.FLIP_TOP_BOTTOM)
      out = im.transpose(Image.ROTATE_90)
      out = im.transpose(Image.ROTATE_180)
      out = im.transpose(Image.ROTATE_270)
    ```
* **直接下載圖的好用工具**
  * [**Google Images Download**](https://github.com/hardikvasa/google-images-download)
