Skip to content

Commit

Permalink
Merge pull request #14 from MiXaiLL76/dev
Browse files Browse the repository at this point in the history
Dev 1.4.0
  • Loading branch information
MiXaiLL76 authored Dec 8, 2023
2 parents 611749b + a83e4e1 commit 9144179
Show file tree
Hide file tree
Showing 40 changed files with 9,892 additions and 4,100 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ build
dist
faster_coco_eval.egg-info
*.pyc
__pycache__
__pycache__
examples/comparison/COCO
examples/comparison/model
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ wheel:
python3 -m build . --wheel

docker-sdist:
bash docker/auto_build.sh "cp38-cp38" sdist
bash -e docker/auto_build.sh "cp38-cp38" sdist

docker-3.7:
bash docker/auto_build.sh "cp37-cp37m" wheel
bash -e docker/auto_build.sh "cp37-cp37m" wheel

docker-3.8:
bash docker/auto_build.sh "cp38-cp38" wheel
bash -e docker/auto_build.sh "cp38-cp38" wheel

docker-3.9:
bash docker/auto_build.sh "cp39-cp39" wheel
bash -e docker/auto_build.sh "cp39-cp39" wheel

docker-3.10:
bash docker/auto_build.sh "cp310-cp310" wheel
bash -e docker/auto_build.sh "cp310-cp310" wheel

docker-3.11:
bash docker/auto_build.sh "cp311-cp311" wheel
bash -e docker/auto_build.sh "cp311-cp311" wheel

pull:
twine check dist/*
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ cocoGt = COCO(....)
cocoDt = cocoGt.loadRes(....)

cur = Curves(cocoGt, cocoDt, iou_tresh=0.5, iouType='segm')
cur.plot_pre_rec(plotly_backend=False)
cur.plot_pre_rec()
````

## Setup dependencies
Expand All @@ -58,6 +58,14 @@ cur.plot_pre_rec(plotly_backend=False)

## history

### v1.4.0

- [x] fix issue <https://github.com/MiXaiLL76/faster_coco_eval/issues/12>
- [x] Updated pre-rec calculation method
- [x] Updated required libraries
- [x] Moved all matplotlib dependencies to plotly
- [x] Append new examples & mmeval test file

### v1.3.3

- [x] fix by ViTrox <https://github.com/vitrox-technologies/faster_coco_eval>
Expand Down Expand Up @@ -135,11 +143,6 @@ cur.plot_pre_rec(plotly_backend=False)
- [x] Append ROC / AUC curves
- [x] Check if it works on windows

### TODOs

- [X] Remove pycocotools dependencies
- [ ] Remove matplotlib dependencies

## License

The original module was licensed with apache 2, I will continue with the same license.
Expand Down
5 changes: 1 addition & 4 deletions csrc/faster_eval_api/coco_eval/cocoeval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,11 @@ namespace coco_eval

std::vector<uint64_t> out_detection_matches = {};
std::vector<uint64_t> out_ground_truth_matches = {};
std::vector<uint64_t> out_detection_ignores = {};
std::vector<int> out_ground_truth_orig_id = {};
// auto eval = evaluations[0];
for (auto eval : evaluations)
{
out_detection_matches.insert(out_detection_matches.end(), eval.detection_matches.begin(), eval.detection_matches.end());
out_ground_truth_matches.insert(out_ground_truth_matches.end(), eval.ground_truth_matches.begin(), eval.ground_truth_matches.end());
out_detection_ignores.insert(out_detection_ignores.end(), eval.detection_ignores.begin(), eval.detection_ignores.end());
out_ground_truth_orig_id.insert(out_ground_truth_orig_id.end(), eval.ground_truth_orig_id.begin(), eval.ground_truth_orig_id.end());
}

Expand All @@ -571,7 +568,7 @@ namespace coco_eval
"recall"_a = recalls_out,
"scores"_a = scores_out,
"detection_matches"_a = out_detection_matches,
"detection_ignores"_a = out_detection_ignores,
// "detection_ignores"_a = out_detection_ignores,
"ground_truth_matches"_a = out_ground_truth_matches,
"ground_truth_orig_id"_a = out_ground_truth_orig_id,
"evaluations_size"_a = evaluations_size);
Expand Down
10 changes: 5 additions & 5 deletions csrc/faster_eval_api/faster_eval_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ namespace coco_eval
pybind11::class_<COCOeval::InstanceAnnotation>(m, "InstanceAnnotation").def(pybind11::init<uint64_t, double, double, bool, bool>());
pybind11::class_<COCOeval::ImageEvaluation>(m, "ImageEvaluation").def(pybind11::init<>());

#ifdef VERSION_INFO
m.attr("__version__") = MACRO_STRINGIFY(VERSION_INFO);
#else
m.attr("__version__") = "dev";
#endif
#ifdef VERSION_INFO
m.attr("__version__") = MACRO_STRINGIFY(VERSION_INFO);
#else
m.attr("__version__") = "dev";
#endif
}

} // namespace coco_eval
1 change: 1 addition & 0 deletions csrc/mask/pycocotools/_mask.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# distutils: language = c
# cython: language_level=2

#**************************************************************************
# Microsoft COCO Toolbox. version 2.0
Expand Down
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/pypa/manylinux_2_28_x86_64
FROM quay.io/pypa/manylinux_2_28_x86_64:latest
LABEL maintainer="MiXaiLL76 <[email protected]>"

USER root
Expand All @@ -17,8 +17,11 @@ ENV EID=${ID}

ENV PATH="${PATH}:/opt/python/${PYTHON3_VERSION}/bin"

RUN alternatives --install /usr/bin/python3 python3 /opt/python/${PYTHON3_VERSION}/bin/python3 1
RUN alternatives --set python3 /opt/python/${PYTHON3_VERSION}/bin/python3

### basic_config
WORKDIR /tmp
COPY docker/build_pipeline.sh .

ENTRYPOINT bash build_pipeline.sh
ENTRYPOINT bash -e build_pipeline.sh
1 change: 1 addition & 0 deletions docker/auto_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ docker build -f ./docker/Dockerfile \
--tag faster_coco_eval:${PYTHON3_VERSION}_${MAKE_CONFIG} .

docker_name="faster_coco_eval_${PYTHON3_VERSION//-/_}_${MAKE_CONFIG}"

docker run --name ${docker_name} -v $(pwd):/app/src faster_coco_eval:${PYTHON3_VERSION}_${MAKE_CONFIG}
docker rm ${docker_name}
226 changes: 0 additions & 226 deletions examples/comparison/coco_fast.py

This file was deleted.

Loading

0 comments on commit 9144179

Please sign in to comment.