Comments (4)
There is a section on evaluation in the README. Can you be more specific with what problems you encounter?
from cosine_metric_learning.
@nwojke In the README, we just find train and test method ,but we can not evaluate the model.In other words , how to get the accuracy about the Market1501 model?
from cosine_metric_learning.
We used the original dataset SDK for final model evaluation, with the intention to use the exact same software that others used for the reported numbers. Therefore, you need to export features of the test split (can be done with provided scripts in this repository) and then evaluate performance using software of the dataset (cannot be done with provided scripts). I am copying over the part which covers this procedure from the README. Let me know if anything remains unclear.
--
Final model testing has been carried out using evaluation software provided by
the dataset authors. The training scripts can be used to write features of the
test split. The following command exports MARS test features to
./MARS-evaluation-master/feat_test.mat
python train_mars.py \
--mode=export \
--dataset_dir=./MARS-evaluation-master \
--loss_mode=cosine-softmax .\
--restore_path=PATH_TO_CHECKPOINT
where PATH_TO_CHECKPOINT
the checkpoint file to evaluate. Note that the
evaluation script needs minor adjustments to apply the cosine similarity metric.
More precisely, change the feature computation in
utils/process_box_features.m
to average pooling (line 8) and apply
a re-normalization at the end of the file. The modified file should look like
this:
function video_feat = process_box_feat(box_feat, video_info)
nVideo = size(video_info, 1);
video_feat = zeros(size(box_feat, 1), nVideo);
for n = 1:nVideo
feature_set = box_feat(:, video_info(n, 1):video_info(n, 2));
% video_feat(:, n) = max(feature_set, [], 2); % max pooling
video_feat(:, n) = mean(feature_set, 2); % avg pooling
end
%%% normalize train and test features
sum_val = sqrt(sum(video_feat.^2));
for n = 1:size(video_feat, 1)
video_feat(n, :) = video_feat(n, :)./sum_val;
end
The Market1501 script contains a similar export functionality which can be
applied in the same way as described for MARS:
python train_market1501.py \
--mode=export \
--dataset_dir=./Market-1501-v15.09.15/
--sdk_dir=./Market-1501_baseline-v16.01.14/
--loss_mode=cosine-softmax \
--restore_path=PATH_TO_CHECKPOINT
This command creates ./Market-1501_baseline-v16.01.14/feat_query.mat
and
./Market-1501_baseline-v16.01.14/feat_test.mat
to be used with the
Market1501 evaluation code.
from cosine_metric_learning.
I am closing this issue due to inactivity. Re-open if the problem is not solved.
from cosine_metric_learning.
Related Issues (20)
- where is my model
- Loss function always return 0
- How long does training take?
- running on custom dataset with no multiple views of the same object HOT 5
- set tensorboard save step
- T SNE visualisation HOT 1
- Does this suit for top view tracking as well?
- Frozen graph
- TF slim for Tensorflow2 HOT 2
- Train cosine_metric_learning on mot21(CroHd) Dataset
- Fine tuning on cells' dataset
- How to count the same person in different photos? Where can I find this inf in your code? Thx for any help.
- VeRi datasets
- CUDNN_STATUS_INTERNAL_ERROR when training on Market dataset
- "Query" subdirectory missing in the folder
- How do I setup my custom dataset? HOT 8
- det.txt for veri dataset
- The time-consuming difference of deep network extraction objects bbox
- How to make custom dataset? (please help me ㅠ_ㅠ) HOT 6
- cosine metric learning model is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosine_metric_learning.