glenn-jocher commited on
Commit
877b826
β€’
1 Parent(s): 51cc096

Created using Colaboratory

Browse files
Files changed (1) hide show
  1. tutorial.ipynb +25 -2
tutorial.ipynb CHANGED
@@ -1031,9 +1031,9 @@
1031
  "source": [
1032
  "## Weights & Biases Logging 🌟 NEW\n",
1033
  "\n",
1034
- "[Weights & Biases](https://www.wandb.com/) (W&B) is now integrated with YOLOv5 for real-time visualization and cloud logging of training runs. This allows for better run comparison and introspection, as well improved visibility and collaboration for teams. To enable W&B `pip install wandb`, and then train normally (you will be guided through setup on first use). \n",
1035
  "\n",
1036
- "During training you will see live updates at [https://wandb.ai/home](https://wandb.ai/home), and you can create and share detailed [Reports](https://wandb.ai/glenn-jocher/yolov5_tutorial/reports/YOLOv5-COCO128-Tutorial-Results--VmlldzozMDI5OTY) of your results. For more information see the [YOLOv5 Weights & Biases Tutorial](https://github.com/ultralytics/yolov5/issues/1289). \n",
1037
  "\n",
1038
  "<img src=\"https://user-images.githubusercontent.com/26833433/98184457-bd3da580-1f0a-11eb-8461-95d908a71893.jpg\" width=\"800\">"
1039
  ]
@@ -1177,6 +1177,29 @@
1177
  "execution_count": null,
1178
  "outputs": []
1179
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1180
  {
1181
  "cell_type": "code",
1182
  "metadata": {
 
1031
  "source": [
1032
  "## Weights & Biases Logging 🌟 NEW\n",
1033
  "\n",
1034
+ "[Weights & Biases](https://wandb.ai/site?utm_campaign=repo_yolo_notebook) (W&B) is now integrated with YOLOv5 for real-time visualization and cloud logging of training runs. This allows for better run comparison and introspection, as well improved visibility and collaboration for teams. To enable W&B `pip install wandb`, and then train normally (you will be guided through setup on first use). \n",
1035
  "\n",
1036
+ "During training you will see live updates at [https://wandb.ai/home](https://wandb.ai/home?utm_campaign=repo_yolo_notebook), and you can create and share detailed [Reports](https://wandb.ai/glenn-jocher/yolov5_tutorial/reports/YOLOv5-COCO128-Tutorial-Results--VmlldzozMDI5OTY) of your results. For more information see the [YOLOv5 Weights & Biases Tutorial](https://github.com/ultralytics/yolov5/issues/1289). \n",
1037
  "\n",
1038
  "<img src=\"https://user-images.githubusercontent.com/26833433/98184457-bd3da580-1f0a-11eb-8461-95d908a71893.jpg\" width=\"800\">"
1039
  ]
 
1177
  "execution_count": null,
1178
  "outputs": []
1179
  },
1180
+ {
1181
+ "cell_type": "code",
1182
+ "metadata": {
1183
+ "id": "GMusP4OAxFu6"
1184
+ },
1185
+ "source": [
1186
+ "# PyTorch Hub\n",
1187
+ "import torch\n",
1188
+ "\n",
1189
+ "# Model\n",
1190
+ "model = torch.hub.load('ultralytics/yolov5', 'yolov5s')\n",
1191
+ "\n",
1192
+ "# Images\n",
1193
+ "dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/'\n",
1194
+ "imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batch of images\n",
1195
+ "\n",
1196
+ "# Inference\n",
1197
+ "results = model(imgs)\n",
1198
+ "results.print() # or .show(), .save()"
1199
+ ],
1200
+ "execution_count": null,
1201
+ "outputs": []
1202
+ },
1203
  {
1204
  "cell_type": "code",
1205
  "metadata": {