Code Monkey home page Code Monkey logo

sekilab / vehiclereidentificationdataset Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 1.26 MB

Vehicle Re-Identification (ReID) dataset contains over 55,000 images for training and validation of the vehicle re-identification model

License: Apache License 2.0

Jupyter Notebook 97.57% Shell 2.43%
carla-driving-simulator osnet reid reidentification vehicle-detection-and-tracking vehicle-reid vehicle-reidentification vehicle-tracking vehicle-trajectory yolo

vehiclereidentificationdataset's People

Contributors

ashutoshiitk avatar homata avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vehiclereidentificationdataset's Issues

datamanager exits with KeyError: 3

Thanks for the dataset, it's a good intro data into getting started with Re-ID.
However, i've encountered an issue while following the instructions xD

# You can change these hyperparameters as you wish
datamanager = torchreid.data.ImageDataManager(

    root='',
    sources='synthtetic_veri_reid',
    height = 256,
    width = 256,
    transforms =['random_flip', 'random_crop'])

The above block raises a KeyError: 3 from class VeRiDataset car_id = label_dict[int(image.split('.jpg')[0].split('_')[-1])]

Is it that the dictionary isn't getting assigned the required key from that split operation ?

Also, the torchreid instructions don't have the root empty as per the custom dataset example

torchreid module wasn't in the condamdx_reid.yml for which i've installed torchreid==0.2.5 through pip

I suppose the error is from the split logic or is there anything else that might be causing it ?
path_to_dataset is pointing to the directory that contains the three data folders of gallery, query and train.

attaching the full trace-back below for reference:
##############################################################################

Building train transforms ...

  • resize to 256x256
  • random flip
  • random crop (enlarge to 288x288 and crop 256x256)
  • to torch tensor of range [0, 1]
  • normalization (mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
    Building test transforms ...
  • resize to 256x256
  • to torch tensor of range [0, 1]
  • normalization (mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
    => Loading train (source) dataset

KeyError Traceback (most recent call last)
Input In [7], in <cell line: 2>()
1 # You can change these hyperparameters as you wish
----> 2 datamanager = torchreid.data.ImageDataManager(
3 root='reid-data',
4 sources='synthtetic_veri_reid',
5 height = 256,
6 width = 256,
7 transforms =['random_flip', 'random_crop'])

File ~/anaconda3/envs/mdx_reid/lib/python3.9/site-packages/torchreid/data/datamanager.py:195, in ImageDataManager.init(self, root, sources, targets, height, width, transforms, k_tfm, norm_mean, norm_std, use_gpu, split_id, combineall, load_train_targets, batch_size_train, batch_size_test, workers, num_instances, num_cams, num_datasets, train_sampler, train_sampler_t, cuhk03_labeled, cuhk03_classic_split, market1501_500k)
193 trainset = []
194 for name in self.sources:
--> 195 trainset_ = init_image_dataset(
196 name,
197 transform=self.transform_tr,
198 k_tfm=k_tfm,
199 mode='train',
200 combineall=combineall,
201 root=root,
202 split_id=split_id,
203 cuhk03_labeled=cuhk03_labeled,
204 cuhk03_classic_split=cuhk03_classic_split,
205 market1501_500k=market1501_500k
206 )
207 trainset.append(trainset_)
208 trainset = sum(trainset)

File ~/anaconda3/envs/mdx_reid/lib/python3.9/site-packages/torchreid/data/datasets/init.py:42, in init_image_dataset(name, **kwargs)
37 if name not in avai_datasets:
38 raise ValueError(
39 'Invalid dataset name. Received "{}", '
40 'but expected to be one of {}'.format(name, avai_datasets)
41 )
---> 42 return __image_datasetsname

Input In [4], in VeRiDataset.init(self, root, **kwargs)
46 for image in IMAGES:
47 cam_id = int(image.split('.jpg')[0].split('')[-2])
---> 48 car_id = label_dict[int(image.split('.jpg')[0].split('
')[-1])]
49 query_array.append((FOLDER_PATH + dataset_type + "/" + image, car_id, cam_id))
52 train = training_array

KeyError: 3

##############################################################################

Thank you !

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.