Skip to content

Commit d3fb34f

Browse files
authored
bump version to 1.0.0 (#502)
* bump version to 1.0.0 * yolodataset unit test
1 parent 0b78eba commit d3fb34f

File tree

6 files changed

+30
-7
lines changed

6 files changed

+30
-7
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ Besides, We provide a notebook [here](./demo/demo-inference-with-pytorch.ipynb)
141141
### Requirements
142142

143143
* Linux or MacOS
144-
* CUDA >= 10.0
145-
* Python >= 3.6
146-
* Pytorch >= 1.10
144+
* CUDA >= 10.2
145+
* Python >= 3.7
146+
* Pytorch >= 1.10.0, <2.0.0
147147

148148
### Step
149149

nanodet/__about__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import time
22

33
_this_year = time.strftime("%Y")
4-
__version__ = "1.0.0-alpha"
4+
__version__ = "1.0.0"
55
__author__ = "RangiLyu"
66
__author_email__ = "[email protected]"
77
__license__ = "Apache-2.0"

nanodet/data/dataset/yolo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _find_image(
6464

6565
def yolo_to_coco(self, ann_path):
6666
"""
67-
convert xml annotations to coco_api
67+
convert yolo annotations to coco_api
6868
:param ann_path:
6969
:return:
7070
"""

requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ onnx-simplifier
77
opencv-python
88
pyaml
99
pycocotools
10-
pytorch-lightning>=1.9.0
10+
pytorch-lightning>=1.9.0,<2.0.0
1111
tabulate
1212
tensorboard
1313
termcolor
14-
torch>=1.10
14+
torch>=1.10,<2.0
1515
torchmetrics
1616
torchvision
1717
tqdm

tests/data/test_img.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
0 0.608987 0.354681 0.359542 0.404493
2+
0 0.719387 0.691062 0.037075 0.074150
3+
0 0.813105 0.692525 0.032876 0.038088
4+
0 0.865956 0.690507 0.020801 0.060458
5+
0 0.922998 0.677377 0.035114 0.085539
6+
0 0.956160 0.656642 0.021013 0.041487
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from nanodet.data.dataset import YoloDataset
2+
3+
4+
def test_yolodataset():
5+
ann_path = "tests/data"
6+
yolodataset = YoloDataset(
7+
img_path=ann_path,
8+
ann_path=ann_path,
9+
class_names=["class1"],
10+
input_size=[320, 320], # [w,h]
11+
keep_ratio=False,
12+
pipeline=dict(normalize=[[103.53, 116.28, 123.675], [57.375, 57.12, 58.395]]),
13+
)
14+
assert len(yolodataset) == 1
15+
for i, data in enumerate(yolodataset):
16+
assert data["img"].shape == (3, 320, 320)
17+
assert data["gt_bboxes"].shape == (6, 4)

0 commit comments

Comments
 (0)