capstone for python course β Step-by-Step Execution in VS Code
π§± 1. Prerequisites Make sure:
You have Python 3.x installed.
Youβve installed VS Code and the Python extension.
Youβve saved the image (capstone_coins.png) into the images/ folder.
π 2. Folder Structure Should Look Like:
coin_identifier/
βββ images/ββ capstone_coins.png
βββ output/ββ (will contain: detected_coins.png, detection_log.txt)
βββ utils/ββ coin_utils.py
βββ coin_detector.py
βββ requirements.txt
π 3. Create Virtual Environment β For Windows: python -m venv venv
venv\Scripts\activate
β For macOS/Linux:
python3 -m venv venv
source venv/bin/activate
You should now see (venv) in your terminal prompt.
π¦ 4. Install Dependencies
pip install -r requirements.txt
π§ π§ͺ 6. Run the Script In your terminal (with venv activated):
python coin_detector.py
β 7. Results After running:
πΎ output/detected_coins.png: Image with labeled coins and total value.
π output/detection_log.txt: Text log with coin values and info.
πΌ A pop-up window will show the image with labels.
β Console will print save confirmation.
β To Exit the Virtual Environment
deactivate