Skip to content

Commit 3eaba2b

Browse files
author
Laurent Thomas
committed
mention changes in v2 + add tips and trick to readme
1 parent c7bdf73 commit 3eaba2b

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,25 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6+
## [2.0.0] - 2024-
7+
8+
### Added
9+
- Type hints for function parameters for most functions
10+
11+
### Changed
12+
- functions uses/returns list of detected hits as a list of tuple : 1 tuple per hit in the form (label, (x,y,width,height), score)
13+
it does not return pandas.DataFrame anymore
14+
15+
## Removed
16+
- dependency on pandas
17+
18+
619
## [1.6.6] - 2023-08-31
720

821
### Changed
922
- Changed licence to MIT
1023

24+
1125
## [1.6.5] - 2023-06-12
1226

1327
### Changed
@@ -45,6 +59,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4559

4660

4761
## [1.6.1] - 2020-08-20
62+
4863
### Added
4964
- support mask for matchTemplates and findMatches as in cv2.matchTemplates with method 0 or 3
5065
- notebook tutorial with mask
@@ -53,43 +68,55 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5368
### Changed
5469
- better docstrings
5570

71+
5672
## [1.6.0.post1] - 2020-08-04
73+
5774
### Fixed
5875
- issue when no detection found (see Changed of version 1.5.3.post2)
5976

6077

6178
## [1.6.0] - 2020-08-03
79+
6280
### Changed
6381
- NMS is now using the opencv `cv2.dnn.NMSBoxes` function
6482
- use timeit for benchmark in example notebook
6583

6684
### Removed
6785
- `MTM.NMS.Point_in_Rectangle` and `MTM.NMS.computeIoU` as they are not used anymore for the NMS
6886

87+
6988
## [1.5.3.post2] - 2020-08-04
89+
7090
### Fixed
7191
- issue when no detection found (see Changed)
7292

7393
### Changed
7494
- `MTM.findMatches` return a dataframe with proper column names (not just empty)
7595
- better handle the different opencv matchTemplate methods
7696

97+
7798
## [1.5.3.post1] - 2020-05-11
99+
78100
### Removed
79101
- remove the hardcoded version requirement for opencv-python-headless in setup.py
80102

81103
### Added
82104
- MTM version is now defined in a dedicated version.py file
83105

106+
84107
## [1.5.3] - 2020-04-28
108+
85109
### Added
86110
- `MTM.computeScoreMap` which is like `cv2.matchTemplate` but checking for image types
87111

88112

89113
## [1.5.2] - 2019-12-19
114+
90115
### Changed
91116
- `MTM.findMatches` automatically cast 16-bit images and/or template to 32-bit
92117

118+
93119
## [1.5.1] - 2019-10-10
120+
94121
### Changed
95122
- use pandas dataframe to return list of hits for `MTM.matchTemplates` and `MTM.findMatches`

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The main function `MTM.matchTemplates` returns the best predicted locations prov
99
The branch opencl contains some test using the UMat object to run on GPU, but it is actually slow, which can be expected for small dataset as the transfer of the data between the CPU and GPU is slow.
1010

1111
# News
12+
- Version 2.0.0 got rid of the dependency on pandas, the list of hit is simply a python list. The new version also features extensive type hints in functions
1213
- 03/03/2023 : Version 1.6.4 contributed by @bartleboeuf comes with speed enhancement thanks to parallelizing of the individual template searches.
1314
Thanks for this first PR !!
1415
- 10/11/2021 : You might be interested to test the newer python implementation which is more object-oriented and only relying on scikit-image and shapely.*
@@ -29,6 +30,26 @@ Then opening a command prompt in the repo's root directory (the one containing t
2930
The [wiki](https://github.com/multi-template-matching/MultiTemplateMatching-Python/wiki) section of the repo contains a mini API documentation with description of the key functions of the package.
3031
The [website](https://multi-template-matching.github.io/Multi-Template-Matching/) of the project contains some more general documentation.
3132

33+
# Tips and tricks
34+
- To have a nicer formatting when printing the list of detected hits, you can wrap it into a numpy array, and print that array as following
35+
`print(np.array(listHit, dtype=object))`, the `dtype=object` argument is required as each hit in the list is made of different data type (string, tuple and float)
36+
37+
- Before version 2.0.0, most functions were returning or accepting pandas DataFrame for the list of hit.
38+
You can still get such DataFrame from the list of hit returned by the newer version of the package, using these commands
39+
40+
```python
41+
import pandas as pd
42+
43+
listLabel = [hit[0] for hit in listHit]
44+
listBbox = [hit[1] for hit in listHit]
45+
listScore = [hit[2] for hit in listHit]
46+
47+
df = pd.DataFrame({"Label":listLabel,
48+
"bounding box":listBbox,
49+
"Score":listScore})
50+
51+
print(df)
52+
```
3253

3354
# Examples
3455
Check out the [jupyter notebook tutorial](https://github.com/multi-template-matching/MultiTemplateMatching-Python/tree/master/tutorials) for some example of how to use the package.

0 commit comments

Comments
 (0)