{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "47558924-cc59-4f1e-a6e4-7c9df75b8492", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(32, 32, 3)" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import cv2\n", "img = cv2.imread(\"v3/test/FAKE/0 (2).jpg\")\n", "img.shape" ] }, { "cell_type": "code", "execution_count": 4, "id": "cd439f69-1257-4505-8c23-90b521ba078c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting opencv-python\n", " Using cached opencv_python-4.11.0.86-cp37-abi3-macosx_13_0_arm64.whl.metadata (20 kB)\n", "Requirement already satisfied: numpy>=1.21.2 in /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages (from opencv-python) (2.1.3)\n", "Using cached opencv_python-4.11.0.86-cp37-abi3-macosx_13_0_arm64.whl (37.3 MB)\n", "Installing collected packages: opencv-python\n", "Successfully installed opencv-python-4.11.0.86\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } ], "source": [ "pip install opencv-python" ] }, { "cell_type": "code", "execution_count": 4, "id": "4c491c03-781b-40ec-af11-f621bd1098ad", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import torch\n", "torch.arange(400000)\n", "torch.mps.is_available()" ] }, { "cell_type": "code", "execution_count": null, "id": "1b83e62a-1c07-4720-8368-5050df60c7f8", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 3, "id": "0272f35d-ad13-4f13-9e95-f1e2159139fa", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[33mWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/opencv-python/\u001b[0m\u001b[33m\n", "\u001b[0m\u001b[33mWARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/opencv-python/\u001b[0m\u001b[33m\n", "\u001b[0m\u001b[33mWARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 51] Network is unreachable')': /simple/opencv-python/\u001b[0m\u001b[33m\n", "\u001b[0m\u001b[33mWARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/opencv-python/\u001b[0m\u001b[33m\n", "\u001b[0m\u001b[33mWARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/opencv-python/\u001b[0m\u001b[33m\n", "\u001b[0m\u001b[31mERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)\u001b[0m\u001b[31m\n", "\u001b[0m\u001b[31mERROR: No matching distribution found for opencv-python\u001b[0m\u001b[31m\n", "\u001b[0m" ] } ], "source": [ "!pip install opencv-python" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.2" } }, "nbformat": 4, "nbformat_minor": 5 }