Skip to content

Commit

Permalink
Update keypoint.ipynb (WongKinYiu#292)
Browse files Browse the repository at this point in the history
* Update keypoint.ipynb

add "with torch.no_grad():" in line 60.

* Update keypoint.ipynb
  • Loading branch information
Kayce001 authored Aug 6, 2022
1 parent 591c5b0 commit 4789bd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/keypoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"outputs": [],
"source": [
"output = non_max_suppression_kpt(output, 0.25, 0.65, nc=model.yaml['nc'], nkpt=model.yaml['nkpt'], kpt_label=True)\n",
"output = output_to_keypoint(output)\n",
"with torch.no_grad():\n",
" output = output_to_keypoint(output)\n",
"nimg = image[0].permute(1, 2, 0) * 255\n",
"nimg = nimg.cpu().numpy().astype(np.uint8)\n",
"nimg = cv2.cvtColor(nimg, cv2.COLOR_RGB2BGR)\n",
Expand Down

0 comments on commit 4789bd1

Please sign in to comment.