{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": "# Livestock detection (DeepForest)" }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Context\n", "### Purpose\n", "Implement and fine-tune a prebuilt Deep Learning model to detect livestock in airborne imagery. The model is implemented using PyTorch Lightning, which simplifies the training process and allows for easy checkpointing, enabling collaborative work by saving and sharing model progress.\n", "\n", "### Modelling Approach\n", "The [live-stock detection model](https://huggingface.co/weecology/deepforest-livestock) from the latest version (v1.4.0) of the [DeepForest](https://deepforest.readthedocs.io/en/latest/) {cite:p}`Weinstein2020_MEE` Deep Learning model is used to predict bounding boxes corresponding to cattle from airborn RGB images.\n", "\n", "As a PyTorch Lightning module, this model can be fine-tuned easily, and checkpoints can be saved as [.safetensors](https://huggingface.co/docs/safetensors/index), making it possible to upload the trained models to platforms like Hugging Face for open collaboration.\n", "\n", "The prebuilt model was trained on a [limited dataset](https://new.wildlabs.net/discussion/global-model-livestock-detection-airborne-imagery-data-applications-and-needs) {cite:p}`livestockdataset`. According to the package's documentation, \"the prebuilt models will always be improved by adding data from the target area\". As such, this notebook will explore the improvement in the model's performance in live-stock detection from fine-tuning on local data.\n", "\n", "### Description\n", "This notebook will explore the capabilities of the DeepForest package. In particular, it will demonstrate how to:\n", "\n", "- Detect livestock in airborne imagery using the prebuilt livestock detection model.\n", "- Fine-tune the model using a novel publicly-available dataset.\n", "- Evaluate the model's performance before and after fine-tuning.\n", "- Save and share model checkpoints throughout the process, allowing for reproducibility and collaboration on Hugging Face.\n", "\n", "
\n", "Note: \n", "Due to the memory constraints of the Binder environment, some steps of the machine learning pipeline are omitted from the notebook. In such cases, we include the relevant code so that it can still be executed in an environment with greater memory and processing power.\n", "
\n", "\n", "### Highlights\n", "The prebuilt model was trained on 2347 training and 690 validation annotations, and its performance metrics on the test set (subset of 356 images excluded from training/validation sets) showed substantial gains:\n", "- __Box Recall:__ Improved from 0.3862 to 0.9391\n", "- __Box Precision:__ Improved from 0.4925 to 0.8628\n", "- __Mean IoU:__ Improved from 0.2070 to 0.6095\n", "\n", "These results demonstrate the potential of improving the model further by sharing checkpoints as open-source models on Hugging Face, enabling collaborative enhancements based on additional local data." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Import libraries" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "editable": true, "jupyter": { "outputs_hidden": false }, "slideshow": { "slide_type": "" }, "tags": [ "hide-input" ] }, "outputs": [], "source": [ "import os\n", "import glob\n", "import urllib\n", "\n", "import numpy as np\n", "import pandas as pd\n", "\n", "import xmltodict\n", "import cv2\n", "import matplotlib.pyplot as plt\n", "from PIL import Image\n", "\n", "from deepforest import main\n", "from deepforest.visualize import plot_predictions\n", "from huggingface_hub import hf_hub_download\n", "\n", "import torch\n", "\n", "from shapely.geometry import box\n", "from skimage.exposure import equalize_hist\n", "\n", "import pooch\n", "\n", "import warnings\n", "warnings.filterwarnings(action='ignore')\n", "\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Set project structure" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "editable": true, "jupyter": { "outputs_hidden": false }, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [], "source": [ "notebook_folder = './notebook'\n", "if not os.path.exists(notebook_folder):\n", " os.makedirs(notebook_folder)\n", "\n", "extract_dir = os.path.join(notebook_folder)\n", "if not os.path.exists(extract_dir):\n", " os.makedirs(extract_dir, exist_ok=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Fetch images and annotations from Zenodo\n", "\n", "Fetch sample images and ground-truth labels from [Zenodo](https://zenodo.org/records/14219057).\n", "\n", "Data were sourced from Harvard's publicly accessible [ODjAR Dataverse](https://dataverse.harvard.edu/dataverse/ODjAR). Specifically, @livestockdataset, which includes \"a large dataset containing aerial images from fields in Juchowo, Poland and Wageningen, the Netherlands, with annotated cows present in the images using Pascal VOC XML Annotation Format.\" There are effectively 3 datasets: Carus_2018, Carus_2019, and Juchowo_2019. There are XML files with the annotations: cow, cow ID, and cow pose.\n", "\n", "Given that this dataset is stored as a multi-part archive, it was necessary to download and unzip the files using `pyunpack`, then distribute the subset of images used to train/validate and test the model separately. This process requires at least 7 GB of available space.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "zenodo = pooch.create(\n", " # Use the default cache folder for the operating system\n", " path=f\"\",\n", " base_url=\"doi:10.5281/zenodo.14219057/\",\n", " # The registry specifies the files that can be fetched\n", " registry={\n", " \"annotations.csv\": \"md5:793358e2c3c59a3a621ff66b31533996\",\n", " \"test.csv\": \"md5:9b1fcc44aec7a678e736366b307f27f8\",\n", " \"test_baseline.csv\": \"md5:95325651118ebf92ec440c440175848c\",\n", " \"test_finetuned.csv\": \"md5:5ef15e75fe4e2d990ac197278a5677e8\",\n", " \"20181001 (196).JPG\": \"md5:d84d3487b4fea5a769b754fcd7655527\",\n", " \"20181002 (228).JPG\": \"md5:6cedf6881250de9d6eeeabb65f245588\",\n", " },\n", ")" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "
\n", "Note: \n", "Due to the memory constraints of the Binder environment, this step is omitted from the notebook. To execute locally, run the following code:\n", "
\n", "\n", "```python\n", "unzipped_files = pooch.retrieve(\n", " url=\"doi:10.5281/zenodo.14219057/images.zip\",\n", " known_hash=\"md5:90a37ff7c1a166f671dac952cfae2708\",\n", " processor=pooch.Unzip(extract_dir=extract_dir),\n", " path=f\"\"\n", ")\n", "\n", "# Load the CSV (annotations)\n", "test_path = [file for file in unzipped_files if file.endswith('test.csv')][0]\n", "test_df = pd.read_csv(test_path)\n", "```" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "## Baseline model" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Download baseline model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Load the model from DeepForest's [Hugging Face](https://huggingface.co/weecology) repository. The `load_model()` function loads the tree crown detection model by default; the following pre-trained models can also be specified:\n", "- weecology/deepforest-bird\n", "- weecology/everglades-nest-detection\n", "- weecology/cropmodel-deadtrees\n", "- weecology/deepforest-livestock\n", "\n", "
\n", "Note: \n", "Due to the memory constraints of the Binder environment, this step is omitted from the notebook. To execute locally, run the following code:\n", "
\n", "\n", "```python\n", "from deepforest import main\n", "\n", "model = main.deepforest()\n", "model.load_model(model_name=\"weecology/deepforest-livestock\", revision=\"main\")\n", "```\n", "\n", "The DeepForest models have identical architectures, but different weights, as tree crown detection model's layers were updated to adapt to the new task. The model weights are saved in [.safetensors](https://huggingface.co/docs/safetensors/index) format.\n" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Evaluate baseline performance" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The baseline performance of the pretrained livestock detection model is evaluated on the test set, using the `evaluate()` method.\n", "\n", "
\n", "Note: \n", "Due to the memory constraints of the Binder environment, this step is omitted from the notebook. To execute locally, run the following code:\n", "
\n", "\n", "```python\n", "model.label_dict = {'cow': 0} # label defaults to 'tree'; change to 'cow', 'bird', etc.\n", "model.config['gpus'] = '-1' # Use GPU (set to '0' for the first GPU or '-1' for all GPUs)\n", "model.config['workers'] = 0\n", "\n", "# Set the directory to save the results of the pretrained model\n", "baseline_save_dir = os.path.join(notebook_folder, 'baseline_pred_result')\n", "os.makedirs(baseline_save_dir, exist_ok=True)\n", "\n", "# Evaluate the pretrained model on the test set (using test_file)\n", "baseline_results = model.evaluate(test_path, os.path.dirname(test_path), iou_threshold=0.4, savedir=baseline_save_dir)\n", "\n", "test_baseline_csv = os.path.join(baseline_save_dir, 'test_baseline.csv')\n", "pd.DataFrame(baseline_results['results']).to_csv(test_baseline_csv, index=False)\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The baseline prediction results are saved in the [Zenodo](https://zenodo.org/records/14219057) folder as `test_baseline.csv`.\n", "\n", "The model's performance is assessed by calculating key metrics such as __Box Recall__, __Box Precision__, and __Mean IoU__ (Intersection over Union), which indicate how accurately the model detects livestock in the test imagery. This serves as a benchmark to compare improvements after fine-tuning:\n", "- __Box Recall:__ 0.3862\n", "- __Box Precision:__ 0.4925\n", "- __Mean IoU:__ 0.2070" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Visualise" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "#### Load sample images" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load the test.csv file\n", "df = zenodo.fetch(\"test.csv\")\n", "df = pd.read_csv(df)\n", "\n", "# Load the image\n", "image_name_1 = \"20181001 (196).JPG\"\n", "image_path_1 = zenodo.fetch(image_name_1)\n", "\n", "image_name_2 = \"20181002 (228).JPG\"\n", "image_path_2 = zenodo.fetch(image_name_2)\n", "\n", "image_1 = Image.open(image_path_1)\n", "image_2 = Image.open(image_path_2)\n", "\n", "image_np_1 = np.array(image_1)\n", "image_np_2 = np.array(image_2)\n" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "#### Plot ground-truth and predictions" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [ "hide-input" ] }, "outputs": [], "source": [ "predictions_df_baseline = zenodo.fetch(\"test_baseline.csv\")\n", "predictions_df_baseline = pd.read_csv(predictions_df_baseline)\n", "\n", "# Filter predicted boxes for the specific image\n", "image_predictions_1 = predictions_df_baseline[predictions_df_baseline['image_path'] == image_name_1]\n", "image_predictions_2 = predictions_df_baseline[predictions_df_baseline['image_path'] == image_name_2]\n", "\n", "# Prepare bounding boxes DataFrame for plot_predictions\n", "# Use xmin, ymin, xmax, ymax and label columns from predictions\n", "boxes_df_1_baseline = image_predictions_1[['xmin', 'xmax', 'ymin', 'ymax', 'score']]\n", "boxes_df_2_baseline = image_predictions_2[['xmin', 'xmax', 'ymin', 'ymax', 'score']]\n", "\n", "# Plot bounding boxes on the image using deepforest.visualize\n", "annotated_image_base_1 = plot_predictions(image_np_1, boxes_df_1_baseline, color=(0, 165, 255), thickness=15)\n", "annotated_image_base_2 = plot_predictions(image_np_2, boxes_df_2_baseline, color=(0, 165, 255), thickness=15)\n", "\n", "fig, axs = plt.subplots(1, 2, figsize=(12, 6)) # Create 1 row, 2 column layout\n", "\n", "axs[0].imshow(annotated_image_base_1)\n", "axs[0].set_title(\"Baseline Predictions, Image 1\")\n", "axs[0].axis('off') \n", "\n", "axs[1].imshow(annotated_image_base_2)\n", "axs[1].set_title(\"Baseline Predictions, Image 2\")\n", "axs[1].axis('off') \n", "\n", "# Show the side-by-side plots\n", "plt.tight_layout()\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "False negatives can be observed, where the baseline model failed to detect some cows present in the ground truth annotations. This highlights areas where the model's initial performance can be improved through fine-tuning using local data to reduce these missed detections." ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "## Fine-tuned model" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Train model" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "In the DeepForest documentation, it is stated that \"we have found that even an hour’s worth of carefully chosen hand-annotation can yield enormous improvements in accuracy and precision. 5-10 epochs of fine-tuning with the prebuilt model are often adequate.\" As such, the model is trained for 5 epochs.\n", "\n", "Early stopping and callbacks are utilised, to ensure that the best model weights are saved.\n", "\n", "
\n", "Note: \n", "Since the Binder environment does not provide enough computational resources for training the model, the following code demonstrates how to set up and train the model in a more powerful local or cloud-based environment using PyTorch Lightning.\n", "
\n", "\n", "```python\n", "import pytorch_lightning as pl\n", "\n", "output_dir = os.path.join(notebook_folder, 'data')\n", "\n", "train_file = os.path.join(output_dir, \"train.csv\")\n", "valid_file = os.path.join(output_dir, \"valid.csv\")\n", "test_file = os.path.join(output_dir, \"test.csv\")\n", "\n", "model.label_dict = {'cow': 0} # Rename label\n", "\n", "# Configure the model for GPU usage and set the CSV file paths\n", "model.config['gpus'] = '-1' # Use GPU (set to '0' for the first GPU or '-1' for all GPUs)\n", "model.config[\"train\"][\"csv_file\"] = train_file # Path to training CSV\n", "model.config[\"train\"][\"root_dir\"] = os.path.dirname(train_file) # Root directory for training images\n", "model.config[\"score_thresh\"] = 0.4 # Set score threshold\n", "model.config[\"train\"]['epochs'] = 5 # Number of epochs\n", "model.config[\"validation\"][\"csv_file\"] = valid_file # Path to validation CSV\n", "model.config[\"validation\"][\"root_dir\"] = os.path.dirname(valid_file) # Root directory for validation images\n", "\n", "early_stopping = EarlyStopping(monitor='box_recall', patience=2, mode='max')\n", "\n", "callback = ModelCheckpoint(\n", " dirpath='checkpoints/', # Directory to save checkpoints\n", " monitor='box_recall', # Metric to monitor\n", " mode=\"max\", # Save when the metric is maximized\n", " save_top_k=3, # Save the top 3 checkpoints\n", " filename=\"box_recall-{epoch:02d}-{box_recall:.2f}\" # File name format for checkpoints\n", ")\n", "\n", "logger = TensorBoardLogger(save_dir='logdir/')\n", "\n", "model.create_trainer(logger=TensorBoardLogger(save_dir='logdir/'),\n", " callbacks=[callback, early_stopping])\n", "\n", "model.trainer.fit(model)\n", "```" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Save and upload checkpoint\n", "\n", "After training the model, the following code saves the fine-tuned model checkpoint to a specified directory, ensuring that the model's progress can be easily reloaded or shared for further use. The checkpoint is saved in .ckpt format using PyTorch Lightning's `save_checkpoint()` method, and then uploaded to Hugging Face.\n", "\n", "```python\n", "checkpoint_dir = './drive/MyDrive/notebook/checkpoints_ckpt'\n", "os.makedirs(checkpoint_dir, exist_ok=True)\n", "\n", "# Save the model checkpoint as .ckpt\n", "checkpoint_path = \"{}/finetuned_checkpoint.ckpt\".format(checkpoint_dir)\n", "model.trainer.save_checkpoint(checkpoint_path)\n", "```" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Load finetuned model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "Note: \n", "Due to the memory constraints of the Binder environment, this step is omitted from the notebook. To execute locally, run the following code:\n", "
\n", "\n", "```python\n", "# Download the finetuned model checkpoint from Hugging Face\n", "ckpt_path = hf_hub_download(\n", " repo_id=\"camappel/deepforest-livestock\",\n", " filename=\"finetuned_checkpoint.ckpt\"\n", ")\n", "\n", "model = main.deepforest.load_from_checkpoint(ckpt_path)\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The finetuned model also can be downloaded manually from [Hugging Face](https://huggingface.co/camappel/deepforest-livestock)." ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Evaluate finetuned performance" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The evaluate method assesses the fine-tuned model’s performance on the test dataset for comparison against the baseline, with predictions available as `test_finetuned.csv` on [Zenodo](https://zenodo.org/records/14219057).\n", "\n", "
\n", "Note: \n", "Due to the memory constraints of the Binder environment, this step is omitted from the notebook. To execute locally, run the following code:\n", "
\n", "\n", "```python\n", "model.label_dict = {'cow': 0} # Assign a unique integer ID to the 'cow' label\n", "model.config['gpus'] = '-1' # Use GPU (set to '0' for the first GPU or '-1' for all GPUs)\n", "model.config['workers'] = 0\n", "\n", "# Set the directory to save the results of the pretrained model\n", "finetuned_save_dir = os.path.join(notebook_folder, 'finetuned_pred_result')\n", "os.makedirs(finetuned_save_dir, exist_ok=True)\n", "\n", "# Evaluate the pretrained model on the test set (using test_file)\n", "finetuned_results = model.evaluate(test_path, os.path.dirname(test_path), iou_threshold=0.4, savedir=finetuned_save_dir)\n", "\n", "test_finetuned_csv = os.path.join(finetuned_save_dir, 'test_finetuned.csv')\n", "pd.DataFrame(finetuned_results['results']).to_csv(test_finetuned_csv, index=False)\n", "```" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Visualise" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [ "hide-input" ] }, "outputs": [], "source": [ "predictions_df_finetuned = zenodo.fetch(\"test_finetuned.csv\")\n", "predictions_df_finetuned = pd.read_csv(predictions_df_finetuned)\n", "\n", "image_predictions_1 = predictions_df_finetuned[predictions_df_finetuned['image_path'] == image_name_1]\n", "image_predictions_2 = predictions_df_finetuned[predictions_df_finetuned['image_path'] == image_name_2]\n", "\n", "# Use xmin, ymin, xmax, ymax and label columns from predictions\n", "boxes_df_1 = image_predictions_1[['xmin', 'xmax', 'ymin', 'ymax', 'label']]\n", "boxes_df_2 = image_predictions_2[['xmin', 'xmax', 'ymin', 'ymax', 'label']]\n", "\n", "annotated_image_fine_1 = plot_predictions(image_np_1, boxes_df_1, color=(0, 165, 255), thickness=15)\n", "annotated_image_fine_2 = plot_predictions(image_np_2, boxes_df_2, color=(0, 165, 255), thickness=15)\n", "\n", "fig, axs = plt.subplots(1, 2, figsize=(12, 6)) # Create 1 row, 2 column layout\n", "\n", "axs[0].imshow(annotated_image_base_1)\n", "axs[0].set_title(\"Baseline Predictions, Image 1\")\n", "axs[0].axis('off') \n", "\n", "axs[1].imshow(annotated_image_fine_1)\n", "axs[1].set_title(\"Finetuned Predictions, Image 1\")\n", "axs[1].axis('off') \n", "\n", "# Show the side-by-side plots\n", "plt.tight_layout()\n", "plt.show()\n", "\n", "fig, axs = plt.subplots(1, 2, figsize=(12, 6)) # Create 1 row, 2 column layout\n", "\n", "axs[0].imshow(annotated_image_base_2)\n", "axs[0].set_title(\"Baseline Predictions, Image 2\")\n", "axs[0].axis('off') \n", "\n", "axs[1].imshow(annotated_image_fine_2)\n", "axs[1].set_title(\"Finetuned Predictions, Image 2\")\n", "axs[1].axis('off') \n", "\n", "# Show the side-by-side plots\n", "plt.tight_layout()\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "predictions_df_baseline[predictions_df_baseline['image_path'] == image_name_2].drop(columns=['label'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "predictions_df_finetuned[predictions_df_finetuned['image_path'] == image_name_2].drop(columns=['label'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "While the fine-tuned model also predicted false positives in Image 2, the evaluation csv shows that their IoU scores are below the threshold of 0.4. The fine-tuned model shows a significant improvement, successfully detecting all cows in the test imagery without any false negatives, demonstrating the effectiveness of fine-tuning on local data." ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "## Summary" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This notebook demonstrates the process of fine-tuning the DeepForest livestock detection model, achieving notable performance improvements after training for 5 epochs. The model was fine-tuned on a labeled aerial dataset of cows from Dataverse (2347 training and 690 validation samples). Performance on the test set (356 samples), which consisted of images excluded from training and validation, showed substantial gains across key metrics:\n", "\n", "- __Box Recall:__ Improved from 0.3862 to 0.9391\n", "- __Box Precision:__ Improved from 0.4925 to 0.8628\n", "- __Mean IoU:__ Improved from 0.2070 to 0.6095\n", "\n", "These results highlight the effectiveness of fine-tuning and open-sourcing, significantly boosting the model's ability to accurately detect livestock in aerial imagery." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Citing this Notebook" ] }, { "cell_type": "markdown", "metadata": {}, "source": "Please see [CITATION.cff](https://github.com/eds-book/95199651-9e81-4cae-a3a7-66398a9a5f62/blob/main/CITATION.cff) for the full citation information. The citation file can be exported to APA or BibTex formats (learn more [here](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files))." }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "## Additional information\n", "\n", "**Review**: This notebook has been reviewed by one or more members of the Environmental Data Science book community. The open review is available [here](https://github.com/alan-turing-institute/environmental-ds-book/issues/260).\n", "\n", "**Dataset**: \"Annotated cows in aerial images for use in deep learning models\" Version 1 {cite:p}`livestockdataset`\n", "\n", "**Codebase**: DeepForest [v1.4.0](https://github.com/weecology/DeepForest)\n", "\n", "**Codebase developers**:\n", "* Ben Weinstein (maintainer & developer), University of Florida, [@bw4sz](https://github.com/bw4sz)\n", "* Henry Senyondo (support maintainer), University of Florida, [@henrykironde](https://github.com/henrykironde)\n", "* Ethan White (PI and author), University of Florida, [@ethanwhite](https://github.com/ethanwhite)\n", "\n", "**License**: The code in this notebook is licensed under the MIT License. The Environmental Data Science book is licensed under the Creative Commons by Attribution 4.0 license. See further details [here](https://github.com/alan-turing-institute/environmental-ds-book/blob/main/LICENSE).\n", "\n", "**Contact**: If you have any suggestion or report an issue with this notebook, feel free to [create an issue](https://github.com/alan-turing-institute/environmental-ds-book/issues/new/choose) or send a direct message to [environmental.ds.book@gmail.com](mailto:environmental.ds.book@gmail.com)." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "editable": true, "jupyter": { "outputs_hidden": false }, "slideshow": { "slide_type": "" }, "tags": [ "remove-input" ] }, "outputs": [], "source": [ "from datetime import date\n", "\n", "print('Notebook repository version: v2025.6.0')\n", "print(f'Last tested: {date.today()}')" ] } ], "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.9.19" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "057266414bad4704824a262f73208212": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": "inline-flex", "flex": null, "flex_flow": "row wrap", "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "100%" } }, "07078fbccef64e9aad06c92a312fca06": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_1595333fd47144c4a58b9d911442188b", "IPY_MODEL_dea43d0baf1346eeadccb20dc8917913", "IPY_MODEL_ad64ec9095704acc925b71b821b30f6b" ], "layout": "IPY_MODEL_8a51a01e8eae4d3aa08d10e3b1aaa5c2", "tabbable": null, "tooltip": null } }, "120b904a2e224422ad74e52e6562aeb7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "1595333fd47144c4a58b9d911442188b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_c6ec671847334b06b12239d53943b071", "placeholder": "​", "style": "IPY_MODEL_dc7836778afe49d0afab984183a347a4", "tabbable": null, "tooltip": null, "value": "model.safetensors: 100%" } }, "22c88f137a2441938f524022cb7155dc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_25ab1b8740fb4780b2e3c29b3b222bc9", "placeholder": "​", "style": "IPY_MODEL_120b904a2e224422ad74e52e6562aeb7", "tabbable": null, "tooltip": null, "value": " 74/74 [03:01<00:00,  0.41it/s]" } }, "25ab1b8740fb4780b2e3c29b3b222bc9": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "2697ec78181e45cb87d181a7f541dc74": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "2c9f2e9c9e864d11b15e212646581623": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "2ebd2f80618742a4a4be8dfccc76273d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_e4a576d50d2a45aeac5254be83388a9c", "max": 256853238, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_859eec55a53e4537a41fe18fb11ffa57", "tabbable": null, "tooltip": null, "value": 256853238 } }, "41bd626032f04d70ac86277e9081a091": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_2697ec78181e45cb87d181a7f541dc74", "placeholder": "​", "style": "IPY_MODEL_6bc7f0fbfc0145809e79644c10fa9a98", "tabbable": null, "tooltip": null, "value": "finetuned_checkpoint.ckpt: 100%" } }, "435c28584f274ce0a38d4b54f3e73fe2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_fa8b5a218da3425896d3f146f04dac87", "IPY_MODEL_c8b84655a9d047659ccca1324a11b92e", "IPY_MODEL_68d57e2f22e64ee3ad11959e032183c2" ], "layout": "IPY_MODEL_763acc929de740b2923c9a1c88690c18", "tabbable": null, "tooltip": null } }, "44b9768703ec48e0a231f8546782ae84": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "48fb5139b65c4bf9b2a5d440e6e65b12": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": "2", "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "4962a28dd26047908eb7e100ec4a08d2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_dd61f2461ffb4501b4140997903b538f", "placeholder": "​", "style": "IPY_MODEL_9fb3e858f42c4c59a39a6e46c08ceb18", "tabbable": null, "tooltip": null, "value": "Predicting DataLoader 0: 100%" } }, "58dc66c87d6d484c81a853553f31110f": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "68d57e2f22e64ee3ad11959e032183c2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_d6e2b6814b964ec8abcb8c8676c091cf", "placeholder": "​", "style": "IPY_MODEL_d03e8839d6644dd1b27e6041d019e88f", "tabbable": null, "tooltip": null, "value": " 74/74 [03:01<00:00,  0.41it/s]" } }, "696f4be445454d069fe1253b1e989b54": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "6bc7f0fbfc0145809e79644c10fa9a98": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "763acc929de740b2923c9a1c88690c18": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": "inline-flex", "flex": null, "flex_flow": "row wrap", "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "100%" } }, "77d50590248b44379830f7d0b6e4ce2b": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "7f397a67fbfa4099a7678069ad37ed6e": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": "2", "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "859eec55a53e4537a41fe18fb11ffa57": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "8a51a01e8eae4d3aa08d10e3b1aaa5c2": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "9fb3e858f42c4c59a39a6e46c08ceb18": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "a0792ed1b71f448b9c1cd7ac19710c76": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_41bd626032f04d70ac86277e9081a091", "IPY_MODEL_2ebd2f80618742a4a4be8dfccc76273d", "IPY_MODEL_a4534bbcb4b340b0b2dd8d72977c5d50" ], "layout": "IPY_MODEL_58dc66c87d6d484c81a853553f31110f", "tabbable": null, "tooltip": null } }, "a41277a794444270a34df84bdbfd9246": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_48fb5139b65c4bf9b2a5d440e6e65b12", "max": 74, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_2c9f2e9c9e864d11b15e212646581623", "tabbable": null, "tooltip": null, "value": 74 } }, "a4534bbcb4b340b0b2dd8d72977c5d50": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_f4b7c20a527d425c9d6893407df1f15d", "placeholder": "​", "style": "IPY_MODEL_696f4be445454d069fe1253b1e989b54", "tabbable": null, "tooltip": null, "value": " 257M/257M [00:06<00:00, 42.9MB/s]" } }, "ab8faf45a45746c3a3a69d3cbdd06de9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "ad64ec9095704acc925b71b821b30f6b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_f46e023eca4b4ec9abf0a67868e32c4b", "placeholder": "​", "style": "IPY_MODEL_ab8faf45a45746c3a3a69d3cbdd06de9", "tabbable": null, "tooltip": null, "value": " 129M/129M [00:08<00:00, 15.4MB/s]" } }, "b7c4830c29254b8d85ec5393e02a84c5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_4962a28dd26047908eb7e100ec4a08d2", "IPY_MODEL_a41277a794444270a34df84bdbfd9246", "IPY_MODEL_22c88f137a2441938f524022cb7155dc" ], "layout": "IPY_MODEL_057266414bad4704824a262f73208212", "tabbable": null, "tooltip": null } }, "c333d1220b4f406fa6ffc64eec871b15": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c6ec671847334b06b12239d53943b071": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c8b84655a9d047659ccca1324a11b92e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_7f397a67fbfa4099a7678069ad37ed6e", "max": 74, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_f643e301f2204662a12b9b802c8eaf7d", "tabbable": null, "tooltip": null, "value": 74 } }, "d03e8839d6644dd1b27e6041d019e88f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "d6e2b6814b964ec8abcb8c8676c091cf": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "dc7836778afe49d0afab984183a347a4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "dd61f2461ffb4501b4140997903b538f": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "dea43d0baf1346eeadccb20dc8917913": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_c333d1220b4f406fa6ffc64eec871b15", "max": 129049980, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_e506a72132b545bba6696e67ed5dee9b", "tabbable": null, "tooltip": null, "value": 129049980 } }, "e4a576d50d2a45aeac5254be83388a9c": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "e506a72132b545bba6696e67ed5dee9b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "f46e023eca4b4ec9abf0a67868e32c4b": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f4b7c20a527d425c9d6893407df1f15d": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f643e301f2204662a12b9b802c8eaf7d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "fa8b5a218da3425896d3f146f04dac87": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_77d50590248b44379830f7d0b6e4ce2b", "placeholder": "​", "style": "IPY_MODEL_44b9768703ec48e0a231f8546782ae84", "tabbable": null, "tooltip": null, "value": "Predicting DataLoader 0: 100%" } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }