[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify code snippets into one of the following categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']."}, {'role': 'user', 'content': 'Identify the single most appropriate category to which the provided code belongs. Provide your response as a single category label without any additional information, commentary, or personal opinions.\\nPython Code:def draw_boxes(img, bboxes, color=(0, 0, 255), thick=6):\ndraw_img = np.copy(img)\nfor bbox in bboxes:\ndraw_img = cv2.rectangle(draw_img,bbox[0],bbox[1],color,thick)\nreturn draw_img\ndef color_hist(img, nbins=32, bins_range=(0, 256)):\nchannel_1 = np.histogram(img[:,:,0], bins =32, range=(0,256))\nchannel_2 = np.histogram(img[:,:,1], bins=32, range=(0, 256))\nchannel_3 = np.histogram(img[:,:,2], bins=32, range=(0, 256))\nbin_edges = channel_1[1]\nbin_centers = (bin_edges[1:]  + bin_edges[0:len(bin_edges)-1])/2\nhist_features = np.concatenate((channel_1[0], channel_2[0], channel_3[0]))\nreturn hist_features\ndef bin_spatial(img, color_space=\'RGB\', size=(32, 32)):\nreturn cv2.resize(img, size).ravel()\ndef data_look(car_list, notcar_list):\ndata_dict = {}\ndata_dict["n_cars"] = len(car_list)\ndata_dict["n_notcars"] = len(notcar_list)\nexample_img = mpimg.imread(car_list[0])\ndata_dict["image_shape"] = example_img.shape\ndata_dict["data_type"] = example_img.dtype\nreturn data_dict\ndef get_hog_features(img, orient, pix_per_cell, cell_per_block, vis=False, feature_vec=True):\nif vis == True:\nfeatures, hog_image = hog(img, orientations=orient, pixels_per_cell=(pix_per_cell, pix_per_cell),\ncells_per_block=(cell_per_block, cell_per_block), transform_sqrt=False,\nvisualise=True, feature_vector=False)\nreturn features, hog_image\nelse:\nfeatures = hog(img, orientations=orient, pixels_per_cell=(pix_per_cell, pix_per_cell),\ncells_per_block=(cell_per_block, cell_per_block), transform_sqrt=False,\nvisualise=False, feature_vector=feature_vec)\nreturn features\n\'\'\'\ndef extract_features(imgs, cspace=\'RGB\', spatial_size=(32, 32),\nhist_bins=32, hist_range=(0, 256)):\nfeatures = []\nfor file in imgs:\nimage = mpimg.imread(file)\nif cspace != \'RGB\':\nif cspace == \'HSV\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)\nelif cspace == \'LUV\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2LUV)\nelif cspace == \'HLS\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2HLS)\nelif cspace == \'YUV\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2YUV)\nelif cspace == \'YCrCb\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2YCrCb)\nelse: feature_image = np.copy(image)\nspatial_features = bin_spatial(feature_image, size=spatial_size)\nhist_features = color_hist(feature_image, nbins=hist_bins, bins_range=hist_range)\nif hog_channel == \'ALL\':\nhog_features = []\nfor channel in range(feature_image.shape[2]):\nhog_features.append(get_hog_features(feature_image[:,:,channel],\norient, pix_per_cell, cell_per_block,\nvis=False, feature_vec=True))\nhog_features = np.ravel(hog_features)\nelse:\nhog_features = get_hog_features(feature_image[:,:,hog_channel], orient,\npix_per_cell, cell_per_block, vis=False, feature_vec=True)\nfeatures.append(np.concatenate((spatial_features, hist_features)))\nreturn features\n\'\'\'\ndef extract_features(imgs, color_space=\'RGB\', spatial_size=(32, 32),\nhist_bins=32, orient=9,\npix_per_cell=8, cell_per_block=2, hog_channel=0,\nspatial_feat=True, hist_feat=True, hog_feat=True):\nfeatures = []\nfor file in imgs:\nfile_features = []\nimage = mpimg.imread(file)\nif color_space != \'RGB\':\nif color_space == \'HSV\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)\nelif color_space == \'LUV\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2LUV)\nelif color_space == \'HLS\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2HLS)\nelif color_space == \'YUV\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2YUV)\nelif color_space == \'YCrCb\':\nfeature_image = cv2.cvtColor(image, cv2.COLOR_RGB2YCrCb)\nelse: feature_image = np.copy(image)\nif spatial_feat == True:\nspatial_features = bin_spatial(feature_image, size=spatial_size)\nfile_features.append(spatial_features)\nif hist_feat == True:\nhist_features = color_hist(feature_image, nbins=hist_bins)\nfile_features.append(hist_features)\nif hog_feat == True:\nif hog_channel == \'ALL\':\nhog_features = []\nfor channel in range(feature_image.shape[2]):\nhog_features.append(get_hog_features(feature_image[:,:,channel],\norient, pix_per_cell, cell_per_block,\nvis=False, feature_vec=True))\nhog_features = np.ravel(hog_features)\nelse:\nhog_features = get_hog_features(feature_image[:,:,hog_channel], orient,\npix_per_cell, cell_per_block, vis=False, feature_vec=True)\nfile_features.append(hog_features)\nfeatures.append(np.concatenate(file_features))\nreturn features\ndef slide_window(img, x_start_stop=[None, None], y_start_stop=[None, None],\nxy_window=(64, 64), xy_overlap=(0.5, 0.5)):\nif x_start_stop[0] == None:\nx_start_stop[0] = 0\nif x_start_stop[1] == None:\nx_start_stop[1] = img.shape[1]\nif y_start_stop[0] == None:\ny_start_stop[0] = 0\nif y_start_stop[1] == None:\ny_start_stop[1] = img.shape[0]\nxspan = x_start_stop[1] - x_start_stop[0]\nyspan = y_start_stop[1] - y_start_stop[0]\nnx_pix_per_step = np.int(xy_window[0]*(1 - xy_overlap[0]))\nny_pix_per_step = np.int(xy_window[1]*(1 - xy_overlap[1]))\nnx_buffer = np.int(xy_window[0]*(xy_overlap[0]))\nny_buffer = np.int(xy_window[1]*(xy_overlap[1]))\nnx_windows = np.int((xspan-nx_buffer)/nx_pix_per_step)\nny_windows = np.int((yspan-ny_buffer)/ny_pix_per_step)\nwindow_list = []\nfor ys in range(ny_windows):\nfor xs in range(nx_windows):\nstartx = xs*nx_pix_per_step + x_start_stop[0]\nendx = startx + xy_window[0]\nstarty = ys*ny_pix_per_step + y_start_stop[0]\nendy = starty + xy_window[1]\nwindow_list.append(((startx, starty), (endx, endy)))\nreturn window_list\ndef plot3d(pixels, colors_rgb,\naxis_labels=list("RGB"), axis_limits=[(0, 255), (0, 255), (0, 255)]):\n"""Plot pixels in 3D."""\nfig = plt.figure(figsize=(8, 8))\nax = Axes3D(fig)\nax.set_xlim(*axis_limits[0])\nax.set_ylim(*axis_limits[1])\nax.set_zlim(*axis_limits[2])\nax.tick_params(axis=\'both\', which=\'major\', labelsize=14, pad=8)\nax.set_xlabel(axis_labels[0], fontsize=16, labelpad=16)\nax.set_ylabel(axis_labels[1], fontsize=16, labelpad=16)\nax.set_zlabel(axis_labels[2], fontsize=16, labelpad=16)\nax.scatter(\npixels[:, :, 0].ravel(),\npixels[:, :, 1].ravel(),\npixels[:, :, 2].ravel(),\nc=colors_rgb.reshape((-1, 3)), edgecolors=\'none\')\nreturn ax  # return Axes3D object for further manipulation'}, {'role': 'assistant', 'content': 'data_preprocessing'}]