Dataset module

This module is used to install and preprocess the data from https://universe.roboflow.com/openglpro/stanford_car/dataset/10 specific for the YOLOv8 version. It is possible to modify the function preprocess to do your own preprocessing. Logs are saved in logs/data.log

class dataset.Dataset

Bases: object

dowload_dataset()

Download and unzip the dataset inside data folder. Use the Roboflow API Key.

  • Workspace: openglpro

  • Dataset: stanford_car

  • Version: 10

  • Model: YOLOv8

merge_train_test(remove_test=True)

From the downloaded dataset merge the test folder with the train folder.

Parameters:

remove_testbool

Remove the test folder after merge. Default is True.

move_files(file_list, origin_dir, destination_dir)

Move list of files from origin diretory to destination diretory

Parameters:

file_listlist

All files inside origin dir that will be moved

origin_dirstrPath

Source diretory

destination_dirstrPath

Destination diretory

preprocess(drop=0.5)

Simple preprocessing. Drop drop*100 from the train and valid datasets

Parameters:

dropint

Ratio from dataset to be dropped