Object Detection and Bounding Boxes

https://d2l.ai/chapter_computer-vision/bounding-box.html

2 Likes

" The input argument boxes can be either a tensor of length 4, or a two-dimensional tensor of shape (n, 4), where n is the number of bounding boxes."
However, according to the code, the argument boxes can only be a 2-dim tensor of shape(n, 4), since we are using index as [:, 0].

1 Like

Four numbers are the minimal amount of information to define a bounding box, no matter in what way it is represented.

Hi,

I tried running the code in collab but !pip install d2l==1.0.3 failed with

Collecting d2l==1.0.3
  Downloading d2l-1.0.3-py3-none-any.whl.metadata (556 bytes)
Collecting jupyter==1.0.0 (from d2l==1.0.3)
  Downloading jupyter-1.0.0-py2.py3-none-any.whl.metadata (995 bytes)
Collecting numpy==1.23.5 (from d2l==1.0.3)
  Downloading numpy-1.23.5.tar.gz (10.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.7/10.7 MB 53.1 MB/s eta 0:00:00
  Installing build dependencies ... done
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Could someone help please?