How to do the evaluation and get the performance of our model.
Opened this issue · 6 comments
I trained the model on the market-1501 dataset but specifying the no-evaluation and and comment the line no 8 for matlab error. Now I want to check the performance of your model like mAP score and accuracy. So my concern is we have to again train our model by installing the matlab so matlab engine error won't come.
We can use the pre-trained weight for evaluation or we have to train our model again. How to provide the matlab engine to your product.
write the features using your trained model, run the predictor_preid.py script:
python3 predictor_preid.py --model-dir= --data= --dataset-name=market1501 --batch-size=128 --network-name=[resnet_v1_50_views or resnet_v1_50]
You can then use the provided matlab eval script by setting paths to your features. See here https://github.com/pse-ecn/expanded-cross-neighborhood under Evaluation.
The official evaluation scripts are in matlab (need matlab installed).
write the features using your trained model, run the predictor_preid.py script:
python3 predictor_preid.py --model-dir= --data= --dataset-name=market1501 --batch-size=128 --network-name=[resnet_v1_50_views or resnet_v1_50]
You can then use the provided matlab eval script by setting paths to your features. See here https://github.com/pse-ecn/expanded-cross-neighborhood under Evaluation.
The official evaluation scripts are in matlab (need matlab installed).
Thanks for replying and tried running the script as you mentioned but its giving me the error in the end that he is not getting the path of csv files or test and query but even though I tried passing whole full path of test and query csv files.
These are the paths I provided in the matlab file.
function result=evalMarketWithPath(evalPath)
querymat=csvread([evalPath 'G:/pose.tar_2/pose/content/pose-sensitive-embedding/output/predictions/query/features.csv']);
queryLab=csvread([evalPath 'G:/pose.tar_2/pose/content/pose-sensitive-embedding/output/predictions/query/labels.csv']);
queryCam=csvread([evalPath 'G:/pose.tar_2/pose/content/pose-sensitive-embedding/output/predictions/query/cameras.csv']);
testmat=csvread([evalPath 'G:/pose.tar_2/pose/content/pose-sensitive-embedding/output/predictions/test/features.csv']);
testLab=csvread([evalPath 'G:/pose.tar_2/pose/content/pose-sensitive-embedding/output/predictions/test/labels.csv']);
testCam=csvread([evalPath 'G:/pose.tar_2/pose/content/pose-sensitive-embedding/output/predictions/test/cameras.csv']);
I also made sure these files exist in the destination as well.
Help me with this.
I think remove the "evalpath" both from your csvread commands as well as from the function call ,
function result=evalMarketWithPath() . Since you are not passing your path in the input 'evalpath' variable, but providing the absolute paths.
Also, here they have an equivalent python evaluation script for evaluating person reid features https://github.com/Cysu/open-reid/blob/master/reid/evaluators.py , have a look at the 'evaluate_all def'. You can call it on your features directly.
Also, here they have an equivalent python evaluation script for evaluating person reid features https://github.com/Cysu/open-reid/blob/master/reid/evaluators.py , have a look at the 'evaluate_all def'. You can call it on your features directly.
if I use this python code then what will be the output? will it be csv files that generated after model training or we have to have to process those cvs files for input. Can you properly explain how should I give the inputs to this python file.
@ravi7248 . have adapted that python function and added here https://github.com/pse-ecn/expanded-cross-neighborhood/blob/master/evaluation/evaluate_person_reid.py
see the read me there https://github.com/pse-ecn/expanded-cross-neighborhood/blob/master/README.md#evaluation on how to run