drawRectangle(ctx, centerX, centerY, w, h) {
    ctx.moveTo(centerX - w / 2, centerY - h / 2);
    ctx.lineTo(centerX + w / 2, centerY - h / 2);
    ctx.lineTo(centerX + w / 2, centerY + h / 2);
    ctx.lineTo(centerX - w / 2, centerY + h / 2);

    return [centerX - w / 2, centerX + w / 2, centerY - h / 2, centerY + h / 2];
  }
Draw a rectangle.

A rectangle is a target object in the simple object detection task here.
Therefore, its bounding box is returned.

@param {} ctx  Canvas context.
@param {number} centerX Center x-coordinate of the triangle.
@param {number} centerY Center y-coordinate of the triangle.
@param {number} w Width of the rectangle.
@param {number} h Height of the rectangle.
@param {number} angle Angle that the triangle is rotated for, in radians.
@returns {[number, number, number, number]} Bounding box of the rectangle:
  [left, right, top bottom].