Giter Site home page Giter Site logo

icarofua / vehicle-rear Goto Github PK

View Code? Open in Web Editor NEW
107.0 12.0 19.0 2.7 MB

Vehicle-Rear: A New Dataset to Explore Feature Fusion For Vehicle Identification Using Convolutional Neural Networks

License: Apache License 2.0

Python 100.00%
keras darknet yolo vehicle-reid vehicle-reidentification ocr

vehicle-rear's People

Contributors

icarofua avatar raysonlaroca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vehicle-rear's Issues

One suggestion about the version of Tensorflow in requirement.txt

Hey there again. In [requirement.txt], the tensorflow version is 2.0.0.a0. However your codes are based on tensorflow 1.9.0. So there would be some changes in several places. I would like to suggest it is reasonable to change TF version from 2.0 to 1.9.0. Thanks a lot~

File "/home/icaro/vehicle-ReId/config.py", line 36, in <lambda> SystemError: unknown opcode

Hi, Thanks for sharing your code. I am facing the following error when tried to predict.

File "Pycharm_projects_/Vehicle_ReID_Research/vehicle-ReId/siamese_files/siamese_plate_stream.py", line 97, in
model = load_model(f1, custom_objects=customs_func)
File anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/engine/saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/engine/saving.py", line 584, in load_model
model = _deserialize_model(h5dict, custom_objects, compile)
File "anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/engine/saving.py", line 274, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/engine/saving.py", line 627, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/layers/init.py", line 168, in deserialize
printable_module_name='layer')
File anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 147, in deserialize_keras_object
list(custom_objects.items())))
File "anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/engine/network.py", line 1075, in from_config
process_node(layer, node_data)
File "anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/engine/network.py", line 1025, in process_node
layer(unpack_singleton(input_tensors), **kwargs)
File "anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/engine/base_layer.py", line 489, in call
output = self.call(inputs, **kwargs)
File "anaconda3/envs/vehicle_reid_research/lib/python3.6/site-packages/keras/layers/core.py", line 716, in call
return self.function(inputs, **arguments)
File "/home/icaro/vehicle-ReId/config.py", line 36, in
SystemError: unknown opcode

I am not sure why it is referring to a config file that is not in my system.

python3 siamese_plate_stream.py train

raceback (most recent call last):
File "siamese_plate_stream.py", line 86, in
validation_steps=val_steps_per_epoch)
File "/usr/local/lib/python3.6/dist-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/training.py", line 2192, in fit_generator
generator_output = next(output_generator)
File "/usr/local/lib/python3.6/dist-packages/keras/utils/data_utils.py", line 793, in get
six.reraise(value.class, value, value.traceback)
File "/usr/local/lib/python3.6/dist-packages/six.py", line 686, in reraise
raise value
File "/usr/local/lib/python3.6/dist-packages/keras/utils/data_utils.py", line 658, in _data_generator_task
generator_output = next(self._generator)
File "/home/zjs/Downloads/car/vehicle-ReId/custom_layers.py", line 540, in generator
results = [future.result() for future in futures]
File "/home/zjs/Downloads/car/vehicle-ReId/custom_layers.py", line 540, in
results = [future.result() for future in futures]
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/zjs/Downloads/car/vehicle-ReId/custom_layers.py", line 492, in load_img
iplt0 = process_load(img[0][0], vec_size)
File "/home/zjs/Downloads/car/vehicle-ReId/custom_layers.py", line 487, in process_load
_i1 = image.img_to_array(_i1, dtype='uint8')
TypeError: img_to_array() got an unexpected keyword argument 'dtype'

Unresolved reference 'amount' in generate_n_sets.py

Hi there, today when I ran generate_n_sets.py, it indicated that contained errors in two lines, and they are line 90 and line 91
comb1 = np.random.permutation(comb1)[:amount]
comb2 = np.random.permutation(comb2)[:amount]
I have no idea about it? Would you help me to debug it? Thank you for your help~~

Any restrictions on the license plate dataset?

If we use the license plate data which includes license plate numbers in the image and annotations, is there any restriction on using them directly in our paper? Any privacy issues? Should we blur the images? Thanks!

python3 siamese_plate_stream.py test models/Plate

raceback (most recent call last):
File "siamese_plate_stream.py", line 103, in
siamese_net = load_model(f1)
File "/usr/local/lib/python3.6/dist-packages/keras/models.py", line 243, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/usr/local/lib/python3.6/dist-packages/keras/models.py", line 317, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "/usr/local/lib/python3.6/dist-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python3.6/dist-packages/keras/utils/generic_utils.py", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "/usr/local/lib/python3.6/dist-packages/keras/engine/topology.py", line 2514, in from_config
process_layer(layer_data)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/topology.py", line 2500, in process_layer
custom_objects=custom_objects)
File "/usr/local/lib/python3.6/dist-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python3.6/dist-packages/keras/utils/generic_utils.py", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "/usr/local/lib/python3.6/dist-packages/keras/engine/topology.py", line 2514, in from_config
process_layer(layer_data)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/topology.py", line 2500, in process_layer
custom_objects=custom_objects)
File "/usr/local/lib/python3.6/dist-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python3.6/dist-packages/keras/utils/generic_utils.py", line 146, in deserialize_keras_object
return cls.from_config(config['config'])
File "/usr/local/lib/python3.6/dist-packages/keras/engine/topology.py", line 1271, in from_config
return cls(**config)
File "/usr/local/lib/python3.6/dist-packages/keras/layers/core.py", line 483, in init
super(Flatten, self).init(**kwargs)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/topology.py", line 293, in init
raise TypeError('Keyword argument not understood:', kwarg)
TypeError: ('Keyword argument not understood:', 'data_format')

数据集如何生成?

您好,
data解压出来的数据:
dataset_1.json
dataset_2.json
dataset_3.json
已经目录dataset2/
中的数据是如何生成的?

python3 siamese_two_stream.py predict sample_two.json models/Two-Stream-Shape-Plate

File "siamese_two_stream.py", line 115, in
img1 = (process_load(data['img1_plate'], input1)/255.0).reshape(1,input1[0],input1[1],input1[2])
File "/home/zjs/Downloads/car/vehicle-ReId/custom_layers.py", line 487, in process_load
_i1 = image.img_to_array(_i1, dtype='uint8')
TypeError: img_to_array() got an unexpected keyword argument 'dtype'

version problem

Thank you for your work
which keras version is reqiured?
which tensorflow version is reqiured?

run siamese_plate_stream.py error

when I run python siamese_plate_stream.py test ../model/Plate
cause an error as follow:
Traceback (most recent call last):
File "siamese_plate_stream.py", line 108, in
test_report('test_plate_%d' % (k),siamese_net, tst_steps_per_epoch, tstGen2)
File "D:\ww\vehicle-ReId-master\custom_layers.py", line 475, in test_report
Y_ = model.predict(X)
File "D:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\training.py", line 1441, in predict
x, _, _ = self._standardize_user_data(x)
File "D:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\training.py", line 579, in _standardize_user_data
exception_prefix='input')
File "D:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\training_utils.py", line 109, in standardize_input_data
str(len(data)) + ' arrays: ' + str(data)[:200] + '...')
ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 2 array(s), but instead got the following list of 4 arrays: [array([[[[0.42745098, 0.43529412, 0.42352941],
[0.42745098, 0.43529412, 0.42352941],
[0.42745098, 0.43529412, 0.42352941],
...,
[0.28235294, 0.29019608, 0.27843137...

CNN-Ocr

How to retrain CNN-ocr on custom plate..!! Can you please tell me the steps to retrain the model on custom number plate.. Any guide link??

how to download your model?

thank you to open your code!
i'd like to test it, but i can't find your model.
so ,where is your model ,could your give a address to us ?
thanks!

python3 siamese_three_stream.py test models/Three-Stream报错

GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
Traceback (most recent call last):
File "siamese_three_stream.py", line 101, in
read_metadata(labels)
File "siamese_three_stream.py", line 24, in read_metadata
data = pd.read_csv(ocr_file, sep=' ')
File "/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py", line 685, in parser_f
return _read(filepath_or_buffer, kwds)
File "/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py", line 457, in _read
parser = TextFileReader(fp_or_buf, **kwds)
File "/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py", line 895, in init
self._make_engine(self.engine)
File "/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py", line 1135, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py", line 1917, in init
self._reader = parsers.TextReader(src, **kwds)
File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.cinit
File "pandas/_libs/parsers.pyx", line 689, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File b'./data/ocr/0p.txt' does not exist: b'./data/ocr/0p.txt'
zjs@hbxt:~/Downloads/car/vehicle-ReId$

OCR dataset frame rate (FPS)?

Thanks for sharing the dataset.

What's the frame rate (FPS) in the OCR dataset in Dataset? In particular, frames in OCR/445-frames-our-scenario/Cruzamento1/2015-03-27-16-00-01, OCR/445-frames-our-scenario/Cruzamento2/2015-03-25-12-40-01 and OCR/445-frames-our-scenario/Cruzamento2/2015-03-27-16-00-01.

Thanks!

GPU util always under 40%

Hello there! I am a newbee in deep learning and I use a RTX2060 with CUDA 10 and Cudnn7.4. When I runs python3 siamese_plate_stream.py train
My GPU util always keep from 1%-36%. However, the Graph memory usage is up to 5603MB, what's more, my CPU util is more than 60% all the time. That is too strange. These are what I tried to solve during these days:

  1. Reinstalled Graphic driver, CUDA, Cudnn.
  2. Reinstalled tensorflow, keras and so on. And strictly followed "Requirement.txt".
  3. Increase batch_size from 128 to 256.
  4. Transfer the project and dataset from HDD to SSD.

Sadly, the situation didn't change. So would you like to help me to solve it? Thanks a lot !!XD

Bug in 5-fold cross-validation

Hi,
The code used for k-fold cross validation in all scripts seems buggy. Only the Validation set is correctly set in the loops, remaining Train and Test Sets have repeated data in 3 loops. Below is the Set-data splits according to the code vs what is written in the paper.

Code
Loop:0
Valid: Set01
Train: Set02 Set03 Test: Set04 Set05

Loop:1
Valid: Set02
Train: Set01 Set03 Test: Set04 Set05

Loop:2
Valid: Set03
Train: Set01 Set02 Test: Set04 Set05

Loop:3
Valid: Set04
Train: Set01 Set02 Test: Set03 Set05

Loop:4
Valid: Set05
Train: Set01 Set02 Test: Set03 Set04

Expected
Loop:0
Valid: Set03
Train: Set01 Set02 Test: Set04 Set05

Loop:1
Valid: Set04
Train: Set02 Set03 Test: Set05 Set01

Loop:2
Valid: Set05
Train: Set03 Set04 Test: Set01 Set02

Loop:3
Valid: Set01
Train: Set04 Set05 Test: Set02 Set03

Loop:4
Valid: Set02
Train: Set05 Set01 Test: Set03 Set04

File "/home/icaro/vehicle-ReId/config.py", line 36, in <lambda> SystemError: unknown opcode

I have found that there was an issue where someone had the exact same issue, I tried with your suggested solution to him, with python3.6.9 and python3.7.9, but I still get this error. Any idea how can I sort that?

Is the requirements.txt file up to date? Because I had a couple of versions issues with TF and Keras before reaching the opcode error.

Thanks in advance.

Query Regarding Model Performance Under Different Lighting Conditions

Dear Ícaro Oliveira de Oliveira and Team,

I hope this message finds you well. I am reaching out to inquire about the performance of the two-stream Convolutional Neural Network (CNN) model, as presented in your esteemed paper "Vehicle-Rear: A New Dataset to Explore Feature Fusion For Vehicle Identification Using Convolutional Neural Networks".

Specifically, I am interested in understanding how the model performs under varying lighting conditions, which can be quite challenging for visual recognition tasks. The dataset samples provided in the README.md showcase instances of severe lighting conditions and dark frames caused by the motion of large vehicles. However, I am keen to learn more about the robustness of the model in these scenarios.

Could you please provide additional insights or results that highlight the model's capability to maintain high precision and recall rates in poor lighting? Moreover, are there any pre-processing steps or augmentations applied to the dataset to mitigate such conditions?

I am considering utilising your dataset and model architecture for a project that involves vehicle re-identification across a network of cameras with significant variations in lighting. Any additional information you could provide would be greatly appreciated.

Thank you for your time and for sharing your research with the community. I look forward to your response.

Kind regards,
yihong1120

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.