Skip to content

Commit 1b73ab2

Browse files
Merge pull request #4 from arvindrajan92/FANPR-1
FANPR-1.1 - Update to build procedure to fix failing master build
2 parents 88ff9e2 + 0cd515a commit 1b73ab2

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

.github/workflows/merge.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
os: [windows-latest, ubuntu-latest, macos-latest, macos-14, raspberrypi]
18-
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
17+
os: [windows-latest, ubuntu-latest, macos-latest, raspberrypi]
18+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
1919
runs-on: ${{ matrix.os }}
2020
steps:
2121
- uses: actions/checkout@v3

.github/workflows/publish.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v3
2020
with:
21-
python-version: '3.x'
21+
python-version: '3.11'
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip

.github/workflows/push.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Python
1515
uses: actions/setup-python@v3
1616
with:
17-
python-version: '3.x'
17+
python-version: '3.11'
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Build Status](https://github.com/arvindrajan92/fastanpr/actions/workflows/push.yaml/badge.svg)](https://github.com/arvindrajan92/fastanpr/actions)
55
[![Build Status](https://github.com/arvindrajan92/fastanpr/actions/workflows/publish.yaml/badge.svg)](https://github.com/arvindrajan92/fastanpr/actions)
66
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/arvindrajan92/fastanpr)](https://github.com/arvindrajan92/fastanpr/releases)
7-
[![Python Versions](https://img.shields.io/badge/python-3.8%20to%203.12-blue)](https://www.python.org/downloads/)
7+
[![Python Versions](https://img.shields.io/badge/python-3.8%20to%203.11-blue)](https://www.python.org/downloads/)
88
[![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
99
[![GitHub stars](https://img.shields.io/github/stars/arvindrajan92/fastanpr?style=social)](https://github.com/arvindrajan92/fastanpr)
1010

fastanpr/detection.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, detection_model: Union[str, Path], device: str):
2020

2121
def run(self, images: List[np.ndarray]) -> List[List[Detection]]:
2222
predictions = self.model.predict(images, device=self.device, verbose=False)
23+
results = []
2324
for image, detection in zip(images, predictions):
2425
image_detections = []
2526
if detection.boxes:
@@ -28,4 +29,5 @@ def run(self, images: List[np.ndarray]) -> List[List[Detection]]:
2829
for det_box, det_conf in zip(det_boxes, det_confs):
2930
x_min, x_max, y_min, y_max = det_box[0], det_box[2], det_box[1], det_box[3]
3031
image_detections.append(Detection(image[y_min:y_max+1, x_min:x_max+1, :], det_box[:4], det_conf))
31-
yield image_detections
32+
results.append(image_detections)
33+
return results

tests/test_fastanpr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async def test_image_4d(file: str, expected_plates: List[str]):
4949
end = time.time()
5050

5151
# processing time must be less than 250 ms
52-
assert (end - start) <= 0.25
52+
assert (end - start) <= 0.50
5353

5454
# same number of plates predicted
5555
assert len(predicted_plates) == len(expected_plates)

0 commit comments

Comments
 (0)