You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ The main function `MTM.matchTemplates` returns the best predicted locations prov
9
9
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.
10
10
11
11
# 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
12
13
- 03/03/2023 : Version 1.6.4 contributed by @bartleboeuf comes with speed enhancement thanks to parallelizing of the individual template searches.
13
14
Thanks for this first PR !!
14
15
- 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
29
30
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.
30
31
The [website](https://multi-template-matching.github.io/Multi-Template-Matching/) of the project contains some more general documentation.
31
32
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
+
```
32
53
33
54
# Examples
34
55
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