Introduction to Machine Vision
Environment Setup
First, we need to install the necessary software:
- Python: Download the latest version of Python. Make sure to select the "Add Python to PATH" option during installation to simplify the environment setup.
- VS Code: Download VS Code. You can refer to the article VS Code Productivity Guide - Environment Setup for configuration instructions.
- Python Extension: VS Code extension
Next, install the required packages. In VS Code, click on the menu bar View
- Terminal
to open the terminal, and enter the following commands:
Install opencv-contrib-python:
Install Matplotlib:
Install scikit-image:
Install dlib. Since direct installation may cause errors, we need to download the .whl file first: Download Link
Navigate to the directory where the file is located and run the command:
Install face-recognition:
Install cvlib:
Install keras:
Install tensorflow:
If the previous command fails, you can try the following command:
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
Install flask:
With these steps, the environment for machine vision is now configured.
Notes
To resolve the issue of relative path errors, add the following statement:
References and Acknowledgements
Original: https://wiki-power.com/
This post is protected by CC BY-NC-SA 4.0 agreement, should be reproduced with attribution.This post is translated using ChatGPT, please feedback if any omissions.