-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
126 changed files
with
11,709 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,5 @@ | ||
.vscode/ | ||
*.pkl | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
run/ | ||
.idea/ | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
tools/predict.csv |
14 changes: 14 additions & 0 deletions
14
faster-rcnn.pytorch/lib/datasets/VOCdevkit-matlab-wrapper/get_voc_opts.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
function VOCopts = get_voc_opts(path) | ||
|
||
tmp = pwd; | ||
cd(path); | ||
try | ||
addpath('VOCcode'); | ||
VOCinit; | ||
catch | ||
rmpath('VOCcode'); | ||
cd(tmp); | ||
error(sprintf('VOCcode directory not found under %s', path)); | ||
end | ||
rmpath('VOCcode'); | ||
cd(tmp); |
56 changes: 56 additions & 0 deletions
56
faster-rcnn.pytorch/lib/datasets/VOCdevkit-matlab-wrapper/voc_eval.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
function res = voc_eval(path, comp_id, test_set, output_dir) | ||
|
||
VOCopts = get_voc_opts(path); | ||
VOCopts.testset = test_set; | ||
|
||
for i = 1:length(VOCopts.classes) | ||
cls = VOCopts.classes{i}; | ||
res(i) = voc_eval_cls(cls, VOCopts, comp_id, output_dir); | ||
end | ||
|
||
fprintf('\n~~~~~~~~~~~~~~~~~~~~\n'); | ||
fprintf('Results:\n'); | ||
aps = [res(:).ap]'; | ||
fprintf('%.1f\n', aps * 100); | ||
fprintf('%.1f\n', mean(aps) * 100); | ||
fprintf('~~~~~~~~~~~~~~~~~~~~\n'); | ||
|
||
function res = voc_eval_cls(cls, VOCopts, comp_id, output_dir) | ||
|
||
test_set = VOCopts.testset; | ||
year = VOCopts.dataset(4:end); | ||
|
||
addpath(fullfile(VOCopts.datadir, 'VOCcode')); | ||
|
||
res_fn = sprintf(VOCopts.detrespath, comp_id, cls); | ||
|
||
recall = []; | ||
prec = []; | ||
ap = 0; | ||
ap_auc = 0; | ||
|
||
do_eval = (str2num(year) <= 2007) | ~strcmp(test_set, 'test'); | ||
if do_eval | ||
% Bug in VOCevaldet requires that tic has been called first | ||
tic; | ||
[recall, prec, ap] = VOCevaldet(VOCopts, comp_id, cls, true); | ||
ap_auc = xVOCap(recall, prec); | ||
|
||
% force plot limits | ||
ylim([0 1]); | ||
xlim([0 1]); | ||
|
||
print(gcf, '-djpeg', '-r0', ... | ||
[output_dir '/' cls '_pr.jpg']); | ||
end | ||
fprintf('!!! %s : %.4f %.4f\n', cls, ap, ap_auc); | ||
|
||
res.recall = recall; | ||
res.prec = prec; | ||
res.ap = ap; | ||
res.ap_auc = ap_auc; | ||
|
||
save([output_dir '/' cls '_pr.mat'], ... | ||
'res', 'recall', 'prec', 'ap', 'ap_auc'); | ||
|
||
rmpath(fullfile(VOCopts.datadir, 'VOCcode')); |
10 changes: 10 additions & 0 deletions
10
faster-rcnn.pytorch/lib/datasets/VOCdevkit-matlab-wrapper/xVOCap.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
function ap = xVOCap(rec,prec) | ||
% From the PASCAL VOC 2011 devkit | ||
|
||
mrec=[0 ; rec ; 1]; | ||
mpre=[0 ; prec ; 0]; | ||
for i=numel(mpre)-1:-1:1 | ||
mpre(i)=max(mpre(i),mpre(i+1)); | ||
end | ||
i=find(mrec(2:end)~=mrec(1:end-1))+1; | ||
ap=sum((mrec(i)-mrec(i-1)).*mpre(i)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -------------------------------------------------------- | ||
# Fast R-CNN | ||
# Copyright (c) 2015 Microsoft | ||
# Licensed under The MIT License [see LICENSE for details] | ||
# Written by Ross Girshick | ||
# -------------------------------------------------------- |
Oops, something went wrong.