Skip to content

Commit

Permalink
bump version to 1.0.0 (#502)
Browse files Browse the repository at this point in the history
* bump version to 1.0.0

* yolodataset unit test
  • Loading branch information
RangiLyu authored Mar 21, 2023
1 parent 0b78eba commit d3fb34f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ Besides, We provide a notebook [here](./demo/demo-inference-with-pytorch.ipynb)
### Requirements

* Linux or MacOS
* CUDA >= 10.0
* Python >= 3.6
* Pytorch >= 1.10
* CUDA >= 10.2
* Python >= 3.7
* Pytorch >= 1.10.0, <2.0.0

### Step

Expand Down
2 changes: 1 addition & 1 deletion nanodet/__about__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import time

_this_year = time.strftime("%Y")
__version__ = "1.0.0-alpha"
__version__ = "1.0.0"
__author__ = "RangiLyu"
__author_email__ = "[email protected]"
__license__ = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion nanodet/data/dataset/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _find_image(

def yolo_to_coco(self, ann_path):
"""
convert xml annotations to coco_api
convert yolo annotations to coco_api
:param ann_path:
:return:
"""
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ onnx-simplifier
opencv-python
pyaml
pycocotools
pytorch-lightning>=1.9.0
pytorch-lightning>=1.9.0,<2.0.0
tabulate
tensorboard
termcolor
torch>=1.10
torch>=1.10,<2.0
torchmetrics
torchvision
tqdm
6 changes: 6 additions & 0 deletions tests/data/test_img.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
0 0.608987 0.354681 0.359542 0.404493
0 0.719387 0.691062 0.037075 0.074150
0 0.813105 0.692525 0.032876 0.038088
0 0.865956 0.690507 0.020801 0.060458
0 0.922998 0.677377 0.035114 0.085539
0 0.956160 0.656642 0.021013 0.041487
17 changes: 17 additions & 0 deletions tests/test_data/test_dataset/test_yolodataset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from nanodet.data.dataset import YoloDataset


def test_yolodataset():
ann_path = "tests/data"
yolodataset = YoloDataset(
img_path=ann_path,
ann_path=ann_path,
class_names=["class1"],
input_size=[320, 320], # [w,h]
keep_ratio=False,
pipeline=dict(normalize=[[103.53, 116.28, 123.675], [57.375, 57.12, 58.395]]),
)
assert len(yolodataset) == 1
for i, data in enumerate(yolodataset):
assert data["img"].shape == (3, 320, 320)
assert data["gt_bboxes"].shape == (6, 4)

0 comments on commit d3fb34f

Please sign in to comment.