Update keypoint.ipynb ()

* Update keypoint.ipynb

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

* Update keypoint.ipynb
pull/449/head
Kayce001 2022-08-06 11:39:28 +08:00 committed by GitHub
parent 591c5b0236
commit 4789bd1a4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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",