so if you are working with python and pandas simply do this get read your csv file into pandas.
import pandas as pd
df = pd.read_csv('my_data.csv')
# get a count of the target class
df['target'].value_counts()
since car has 56 data records, and the rest has much lower number of data records, you can upscale the data records of the other four categories(bike,bus,pedestrian) to match the number of data records of the car category.
Extract the data records of car category
car = df[(df.target == "car") ]
car
Then Extract the data records of bike category
bike = df[(df.target == "bike") ]
bike
bike_and_car=car
#merge the bike and car dataframes
bike_and_car = bike_and_car.append(bike, ignore_index = True)
bike_and_car
bike_and_car = bike_and_car.replace('car',1)
bike_and_car = bike_and_car.replace('bike',0)
X=bike_and_car.drop(['target'], axis=1)
y=bike_and_car['target]
Now import the smote module SMOTENC or SVMSMOTE from imblearn library
from imblearn.over_sampling import SMOTENC
smote_nc = SMOTENC(random_state=42)
X_res, y_res = smote_nc.fit_resample(X, y)
X_res
X_res
should contain additional generated synthetic data records to the original data you initially had for the bike category repeat the same procedure for other categories: bicycle and pedestrian
You can downlaod that dataframe X_res
as a csv
df.to_csv(r'C:\Users\Moon\Documents\my_data_with_synthetic_data.csv', index=False)