satojkovic / deeptrafficsign Goto Github PK
View Code? Open in Web Editor NEWTraffic sign recognition with Deep Convolutional Neural Networks
Traffic sign recognition with Deep Convolutional Neural Networks
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
Original links for setup on http://benchmark.ini.rub.de are not working, I found files with same name on sid.erda.dk/public/archives but I am unable to run any commands after:
python3 gen_pickle.py
fails after few minutes with error below (Ubuntu 21.04 + Python 3.9.5 + pandas-1.3.4 + tensorflow 2.7.0 - please specify if some older version of sw should be used):
Traceback (most recent call last):
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3361, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'ClassId'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/mnt/c/Temp/2021/speed_limit_ai/test-3rd-party/DeepTrafficSign/gen_pickle.py", line 229, in <module>
main()
File "/mnt/c/Temp/2021/speed_limit_ai/test-3rd-party/DeepTrafficSign/gen_pickle.py", line 195, in main
test_bboxes, test_classIds = parse_gt_csv(test_gt_csvs, common.TEST_SIZE)
File "/mnt/c/Temp/2021/speed_limit_ai/test-3rd-party/DeepTrafficSign/gen_pickle.py", line 70, in parse_gt_csv
for i, (img_file_path, bbox,
File "/mnt/c/Temp/2021/speed_limit_ai/test-3rd-party/DeepTrafficSign/gen_pickle.py", line 52, in gt_csv_getline
classId = df.loc[i, 'ClassId']
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 925, in __getitem__
return self._getitem_tuple(key)
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 1100, in _getitem_tuple
return self._getitem_lowerdim(tup)
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 862, in _getitem_lowerdim
return getattr(section, self.name)[new_key]
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 931, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 1164, in _getitem_axis
return self._get_label(key, axis=axis)
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 1113, in _get_label
return self.obj.xs(label, axis=axis)
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/generic.py", line 3776, in xs
loc = index.get_loc(key)
File "/home/tester/.local/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3363, in get_loc
raise KeyError(key) from err
KeyError: 'ClassId'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.