diff --git a/tomato_model/working_tomato.ipynb b/tomato_model/working_tomato.ipynb index 0ff48eb..5d213ab 100644 --- a/tomato_model/working_tomato.ipynb +++ b/tomato_model/working_tomato.ipynb @@ -1614,7 +1614,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -1624,13 +1624,135 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "model_onnx = onnx.load(r\"runs\\detect\\train\\weights\\best.onnx\")" ] }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "onnx_model_path = \"runs/detect/train/weights/best.onnx\"" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "import onnxruntime" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "sess = onnxruntime.InferenceSession(onnx_model_path)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "img_path = \"val/images/IMG_20191215_112519.jpg\"\n", + "img = Image.open(img_path)\n", + "\n", + "# Resize the image to match the model input dimensions (640x640)\n", + "img = img.resize((640, 640))\n", + "\n", + "# Convert the image to a NumPy array and normalize if necessary\n", + "img_array = np.array(img).astype(np.float32) / 255.0\n", + "\n", + "# Add a batch dimension to match the model input shape\n", + "input_data = np.expand_dims(img_array, axis=0)\n", + "\n", + "# Transpose the array to match the expected shape [1, 3, 640, 640]\n", + "input_data = np.transpose(input_data, (0, 3, 1, 2))\n", + "\n", + "# Run inference\n", + "output = sess.run(None, {'images': input_data})\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import matplotlib.patches as patches" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUh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jjxo266aabtGfPHpWUlMjn82n69OkxH3+HROHZBOFUBj799FNNmzZNdXV18ng8GjhwoDZv3qzRo0dLkhYvXqzm5mbNnj1bjY2NKioq0pYtW5SWluZcY8WKFUpMTNSkSZPU3NyskSNHau3atUpISAg79E5pE2RlZSkhIaFNptfQ0NAms+xKF1dZf12cXq9Xra2tamxs/No5n376aZvrf/bZZxF/3nnz5unVV1/VW2+9pb59+8ZV7MnJybruuus0ZMgQlZeXa9CgQfrNb34T87HX1NSooaFBhYWFSkxMVGJioqqqqvQv//IvSkxMdK4dq/FfKjU1VQUFBTp06FDM/9779OmjG2+8MeTYDTfc4Cw6jvX4Lzpy5Ii2bt2qhx56yDkW67H/4z/+ox5++GHde++9Kigo0LRp0/Tzn//cWRUf6/F3SCe3CdasWaO//OUvamlpUUNDg7Zu3eokAtKFJKm0tFR1dXU6e/asqqqqnErwRSkpKfrtb3+rL774QmfOnNHvf/975eTkdOjjd0oykJycrMLCwpDehiRVVlZ2qLdxtUSrTzN06FD5/X699957zpz//u//lt/v7/DnNcZo7ty5evnll/Xmm28qNzc3bmL/us8Uzf7Y1Yp95MiR2rt3r/bs2eOMIUOGaOrUqdqzZ4/69+8f0/FfqqWlRR9++KH69OkT87/32267rc3tsx999JHzhNRYj/+iF154Qb1799a4ceOcY7Ee+5kzZ9StW+ifh4SEBOfWwliPv0NiYM1Alwp7yWEHVVRUmKSkJLNmzRpz4MABU1JSYlJTU81f/vKXzgrBGHNhRfju3bvN7t27jSSzfPlys3v3bnPkyBFjjDFPPfWU8Xg85uWXXzZ79+419913n+nTp49pampyrjFr1izTt29fs3XrVrNr1y5z5513mkGDBpnz5887c374wx+agQMHmnfffde8++67pqCgwIwfP77Dcf/0pz81Ho/HvP3226aurs4ZZ86ccebEauzGGPPII4+Ybdu2mdraWvPBBx+YRx991HTr1s1s2bIl5mO/kkvvJojl+BcuXGjefvttc/jwYbNz504zfvx4k5aW5vx/F6txG2PMe++9ZxITE82TTz5pDh06ZP793//d9OjRw2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WbM6PRaSAQAAusDkyZP1xRdf6PHHH1ddXZ3y8/P12muvqV+/fp0eC/sMAABgOfYZAADAciQDAABYjmQAAADLkQwAAGA5kgEAACxHMgAAgOVIBgAAsBzJAAAAliMZAADAciQDAABYjmQAAADLkQwAAGC5/wcqnmLlxVmxJwAAAABJRU5ErkJggg==", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "output_array = output[0]\n", + "\n", + "# Extract the image from the array (assuming it represents an image)\n", + "image = np.squeeze(output_array)\n", + "\n", + "# Display the image using matplotlib\n", + "plt.imshow(image, cmap='viridis') # You can choose a different colormap if needed\n", + "plt.colorbar()\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[array([[[ 9.1795, 10.609, 15.407, ..., 571.7, 608.08, 637.42],\n", + " [ 14.536, 19.348, 13.814, ..., 640.77, 639.34, 633.99],\n", + " [ 18.398, 21.376, 31.429, ..., 387.02, 368.76, 333.3],\n", + " ...,\n", + " [ 1.3977e-05, 1.2845e-05, 8.1062e-06, ..., 1.7881e-07, 1.4901e-07, 1.7881e-07],\n", + " [ 5.9545e-05, 4.3005e-05, 1.4186e-05, ..., 4.1723e-07, 3.2783e-07, 2.9802e-07],\n", + " [ 0.00046247, 0.00027332, 6.2734e-05, ..., 5.3644e-07, 4.4703e-07, 4.7684e-07]]], dtype=float32)]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "output" + ] + }, { "cell_type": "code", "execution_count": 2,