satojkovic / DeepTrafficSign

Traffic sign recognition with Deep Convolutional Neural Networks
20 stars 3 forks source link

Config has no attribute #2

Closed ethanS06 closed 1 year ago

ethanS06 commented 1 year ago

I cloned the repo and install the dataset from this link https://sid.erda.dk/public/archives/daaeac0d7ce1152aea9b61d9f1e19370/published-archive.html but when I tried to run gen_picle.py I get this error: train_gt_csvs = get_gt_csvs(config.TRAIN_ROOT_DIR) AttributeError: module 'config' has no attribute 'TRAIN_ROOT_DIR'

I have this config.py file :

import re
from yacs.config import CfgNode

_C = CfgNode()

_C.GTSRB_ROOT_DIR = 'GTSRB'

_C.TRAIN_ROOT_DIR = os.path.join(_C.GTSRB_ROOT_DIR, 'Final_Training')
_C.TRAIN_PKL_FILENAME = 'traffic_sign_train_dataset.pickle'
_C.TRAIN_SIZE = len([
    f
    for root, dirs, files in os.walk(os.path.join(_C.TRAIN_ROOT_DIR, 'Images'))
    for f in files if re.search(r'.ppm', f)
])

_C.TEST_ROOT_DIR = os.path.join(_C.GTSRB_ROOT_DIR, 'Final_Test')
_C.TEST_PKL_FILENAME = 'traffic_sign_test_dataset.pickle'
_C.TEST_SIZE = len([
    f
    for root, dirs, files in os.walk(os.path.join(_C.TEST_ROOT_DIR, 'Images'))
    for f in files if re.search(r'.ppm', f)
])

I am running all of this on Windows do I have to run it on Linux

satojkovic commented 1 year ago

@ethanS06 Sorry for late response. I fixed the error, could you try to pull it and run it again?