Encountering zero division error while trying run this code, the nsamples read zero values

58 views Asked by At

I am trying to run a GitHub repository about few shot detection but I encountered an error here

while trying to train my code using this train_meta.py

import sys, os, time, math
from tqdm import tqdm

import torch
import torch.optim as optim
from torchvision import transforms

from data import dataset
from scripts.utils import *
from cfg.cfg import parse_cfg, cfg
from models.darknet_meta import Darknet

if len(sys.argv) != 5:
    print('Usage:')
    print('python train.py [datacfg] [darknetcfg] [learnetcfg] [weightfile]')
    exit()

# cfg file
datacfg = sys.argv[1]
darknetcfg = parse_cfg(sys.argv[2])
learnetcfg = parse_cfg(sys.argv[3])
weightfile = sys.argv[4]

# read cfg file
data_options = read_data_cfg(datacfg)
net_options = darknetcfg[0]
meta_options = learnetcfg[0]

# Configure options
cfg.config_data(data_options)
cfg.config_meta(meta_options)
cfg.config_net(net_options)

# Parameters from args-1
metadict = data_options['meta']
trainlist = data_options['train']

testlist = data_options['valid']
backupdir = cfg.backup  # +"+_novel"+str(cfg.novelid)+"_neg"+str(cfg.neg_ratio)#data_options['backup']
gpus = data_options['gpus']  # e.g. 0,1,2,3
ngpus = len(gpus.split(','))
num_workers = int(data_options['num_workers'])

if not os.path.exists(backupdir):
    os.mkdir(backupdir)
# Parameters from args-2
factor = 3
batch_size = int(net_options['batch'])
max_batches = int(net_options['max_batches'])
learning_rate = float(net_options['learning_rate']) / factor
momentum = float(net_options['momentum'])
decay = float(net_options['decay'])
steps = [float(step) for step in net_options['steps'].split(',')]
scales = [float(scale) for scale in net_options['scales'].split(',')]

# Train parameters
use_cuda = True
seed = int(time.time())
eps = 1e-5
eval_interval = 2000000  # batches
save_interval = 10  # every [save_interval] epoch to save the model

torch.manual_seed(seed)
if use_cuda:
    os.environ['CUDA_VISIBLE_DEVICES'] = gpus
    torch.cuda.manual_seed(seed)

# Test parameters
conf_thresh = 0.25
nms_thresh = 0.4
iou_thresh = 0.5

# load Meta-model
model = Darknet(darknetcfg, learnetcfg)
region_loss = model.loss
model.load_weights(weightfile)
# model.print_network()

# Meta-model parameters
region_loss.seen = model.seen
processed_batches = 0 if cfg.tuning else model.seen / batch_size
trainlist = dataset.build_dataset(data_options)
nsamples = len(trainlist)
init_width = model.width
init_height = model.height
init_epoch = 0 if cfg.tuning else model.seen / nsamples
max_epochs = int(max_batches * batch_size / nsamples + 1)
max_epochs = int(math.ceil(cfg.max_epoch * 1. / cfg.repeat)) if cfg.tuning else max_epochs

if use_cuda:
    if ngpus > 1:
        model = torch.nn.DataParallel(model).cuda()
    else:
        model = model.cuda()

My concern is about this area

datacfg       = sys.argv[1]
data_options = read_data_cfg(datacfg)
trainlist = data_options['train']

trainlist = dataset.build_dataset(data_options)
nsamples = len(trainlist)

If I use this command

python3 train_meta.py cfg/metayolo.data cfg/darknet_dynamic.cfg cfg/reweighting_net.cfg darknet19_448.conv.23

So it must read that sys.argv[1] = cfg/metayolo.data

This must be referring to a file named metayolo.data with content

metain_type=2
data=voc
neg = 1
rand = 0
novel = data/voc_novels.txt
novelid = 0
# scale = 0
meta = data/voc_traindict_full.txt
train = /home/muzakki/Muzakki_FYP/main/voc_train.txt
valid = /home/muzakki/Muzakki_FYP/main/2023_test.txt
backup = backup/metayolo
gpus=0
num_workers=8

so it must read the "train" which is

train = /home/muzakki/Muzakki_FYP/main/voc_train.txt

checking its path in file explorer the path is the same, so there is no problem

path: /home/muzakki/Muzakki_FYP/main/voc_train.txt

voc_train.txt has 315 lines of the image path, this is the content

/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_01.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_02.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_04.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_05.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_06.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_07.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_09.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_10.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_11.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_12.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_14.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_15.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_16.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_17.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_18.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_20.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_21.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_22.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_23.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_25.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_26.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_27.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_28.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_29.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_30.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_32.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_34.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_35.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_36.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_37.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_38.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_40.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_41.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_42.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_43.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_44.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_45.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_46.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_47.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/bus_48.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_01.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_03.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_04.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_06.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_08.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_09.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_10.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_11.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_13.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_14.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_15.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_16.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_17.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_18.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_19.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_20.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_21.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_22.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_23.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_25.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_26.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_27.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_28.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_29.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_31.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_33.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_34.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_35.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_36.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_37.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_39.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_41.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_42.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_43.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_45.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_46.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_47.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_48.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_49.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/car_50.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_01.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_03.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_05.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_07.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_08.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_09.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_10.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_11.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_12.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_13.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_14.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_15.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_17.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_18.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_19.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_20.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_21.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_22.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_23.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_24.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_27.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_28.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_30.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_32.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_33.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_34.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_35.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_36.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_37.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_38.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_39.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_40.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_41.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_42.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_44.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_45.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_46.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_47.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_48.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_2x_50.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_01.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_02.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_03.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_04.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_05.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_06.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_07.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_08.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_09.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_10.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_11.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_15.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_17.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_20.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_21.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_22.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_23.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_24.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_25.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_26.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_28.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_29.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_30.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_31.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_32.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_33.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_34.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_35.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_36.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_37.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_38.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_39.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_41.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_44.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_45.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_46.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_47.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_48.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_49.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_3x_50.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_02.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_03.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_04.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_05.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_06.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_07.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_08.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_10.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_11.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_12.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_13.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_14.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_17.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_18.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_19.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_22.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_23.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_24.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_25.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_26.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_28.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_29.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_30.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_31.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_32.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_33.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_34.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_35.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_36.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_37.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_38.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_39.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_40.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_41.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_42.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_44.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_45.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_46.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_47.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_4x_50.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_01.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_02.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_03.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_04.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_05.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_06.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_07.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_09.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_10.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_11.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_12.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_13.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_14.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_15.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_17.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_18.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_19.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_21.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_22.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_23.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_25.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_26.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_27.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_29.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_30.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_31.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_32.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_34.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_35.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_36.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_37.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_39.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_40.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_41.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_42.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_43.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_46.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_48.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_49.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_5x_50.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_01.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_02.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_04.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_06.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_07.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_09.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_10.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_11.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_12.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_13.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_15.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_16.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_17.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_18.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_19.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_20.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_22.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_23.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_24.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_25.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_26.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_30.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_31.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_32.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_33.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_34.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_35.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_36.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_37.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_39.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_41.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_42.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_43.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_44.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_45.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_46.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_47.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_48.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_49.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2021/JPEGImages/truck_s_50.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/bus_03.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/bus_08.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/bus_19.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/bus_33.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/bus_39.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/car_02.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/car_24.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/car_30.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/car_38.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/car_44.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_2x_04.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_2x_06.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_2x_25.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_2x_26.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_2x_29.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_3x_12.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_3x_13.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_3x_14.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_3x_19.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_3x_42.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_4x_01.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_4x_15.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_4x_20.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_4x_27.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_4x_43.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_5x_08.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_5x_20.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_5x_28.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_5x_33.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_5x_38.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_s_05.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_s_14.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_s_21.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_s_29.jpg
/home/muzakki/Muzakki_FYP/main/VOCdevkit/VOC2022/JPEGImages/truck_s_38.jpg

But the result of running the above command is

Traceback (most recent call last):
  File "/home/muzakki/Muzakki_FYP/main/train_meta.py", line 91, in <module>
    max_epochs = int(max_batches * batch_size / nsamples + 1)
ZeroDivisionError: division by zero

and If I debug it

nsamples = len(trainlist)
print(nsamples)

It printed 0 values

It should read the amount of samples i want to use which is 315 samples but instead it read nothing, is there anything wrong with it, why the result 0? what happened there?

For more information I am trying to run this repository,

https://github.com/DeepTrial/Few-shot-Object-Detection-via-Feature-Reweighting/

but here I am trying to use my own dataset in PASCAL VOC format.

0

There are 0 answers