Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/torchvision update #381

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7a29964
add test for coco yaml parsing
aaronrmm Jan 17, 2024
d690d94
add remaining config tests
aaronrmm Jan 17, 2024
3cf1a78
Add somoe test for parsing config files
aaronrmm Jan 21, 2024
6b6c572
black formatting
aaronrmm Jan 21, 2024
c693d0d
output embeddings
aaronrmm Jan 21, 2024
00bd3c9
black formatting
aaronrmm Jan 21, 2024
45fe6d5
postprocessing outputs features
aaronrmm Jan 21, 2024
cee45ff
update rtdetr model test
aaronrmm Jan 21, 2024
470763b
black formatting
aaronrmm Jan 22, 2024
e20577a
fix failing to return results
aaronrmm Jan 22, 2024
8606744
add torch pkl export
aaronrmm Jan 22, 2024
b90e219
black formatting
aaronrmm Jan 22, 2024
5c9d93a
add logging hooks
aaronrmm Jan 23, 2024
0826693
Remove debugging print statement
aaronrmm Jan 25, 2024
9cbdd32
remove inference dependency on torchvision 0.15
aaronrmm Feb 5, 2024
c6ecb94
Merge pull request #1 from lyuwenyu/main
aaronrmm May 23, 2024
c48fcfe
Add angle output to architecture and forwards
aaronrmm May 23, 2024
f41064d
Revert "Add angle output to architecture and forwards"
aaronrmm May 23, 2024
eadc81a
Revert "Merge pull request #1 from lyuwenyu/main"
aaronrmm May 23, 2024
00362ae
Merge remote-tracking branch 'sibling-fork/main'
aaronrmm May 23, 2024
844893f
Add angle output to architecture and forwards
aaronrmm May 23, 2024
3c90928
Cherry-pick c6ecb943a8f3e01d31d3e7d427a39778b5dab4e6
aaronrmm May 23, 2024
e4ce1bc
Add angle output to bbox decoder head
aaronrmm May 23, 2024
4cc933d
postprocessor returns angles
aaronrmm May 24, 2024
f32d4fa
add empty setup file
aaronrmm May 28, 2024
0914d3e
rename package to rtrdetr
aaronrmm May 28, 2024
d426fe9
add angle losses to criterion
aaronrmm May 30, 2024
a397f22
fix error when loggers are None
aaronrmm May 30, 2024
8ca4164
add HRSC2016 as a Coco rotated dataset
aaronrmm May 30, 2024
63294aa
Fix error when something is registered twice
aaronrmm May 30, 2024
2c14729
Set dataset to HRSC2016 in config
aaronrmm May 30, 2024
7f89bb3
Revert dropping imports
aaronrmm May 30, 2024
79a0563
updated to use torchvision =< 0.16.0
cuevas1208 Jul 23, 2024
7348505
updated to use /rtrdetr-0.2-py3-none-any.whl s3
cuevas1208 Jul 23, 2024
752dd36
backwards compatibility for models without angle/rotation
cuevas1208 Sep 25, 2024
d1ebecd
Fix wrong angle return size when not used
mkilpatr Sep 26, 2024
c8972c1
rtdtr updates to train
cuevas1208 Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
565 changes: 320 additions & 245 deletions rtdetr_paddle/ppdet/modeling/losses/detr_loss.py

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions rtdetr_pytorch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,10 @@ python tools/export_onnx.py -c configs/rtdetr/rtdetr_r18vd_6x_coco.yml -r path/t

2. add `-t path/to/checkpoint` (optinal) to tuning rtdetr based on pretrained checkpoint. see [training script details](./tools/README.md).
</details>


<details open>
<summary>list of wheel release</summary>

rtrdetr-0.1.1-py3-none-any.whl - updated to use torchvision =< 0.16.0

12 changes: 6 additions & 6 deletions rtdetr_pytorch/configs/dataset/coco_detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ remap_mscoco_category: True
train_dataloader:
type: DataLoader
dataset:
type: CocoDetection
img_folder: ./dataset/coco/train2017/
ann_file: ./dataset/coco/annotations/instances_train2017.json
type: HRSC2016Dataset
img_folder: ../data/HRSC2016-MS/AllImages
ann_folder: ../data/HRSC2016-MS/Annotations
transforms:
type: Compose
ops: ~
Expand All @@ -21,9 +21,9 @@ train_dataloader:
val_dataloader:
type: DataLoader
dataset:
type: CocoDetection
img_folder: ./dataset/coco/val2017/
ann_file: ./dataset/coco/annotations/instances_val2017.json
type: HRSC2016Dataset
img_folder: ../data/HRSC2016-MS/AllImages
ann_folder: ../data/HRSC2016-MS/Annotations
transforms:
type: Compose
ops: ~
Expand Down
14 changes: 7 additions & 7 deletions rtdetr_pytorch/configs/rtdetr/include/dataloader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ train_dataloader:
ops:
- {type: RandomPhotometricDistort, p: 0.5}
- {type: RandomZoomOut, fill: 0}
- {type: RandomIoUCrop, p: 0.8}
- {type: SanitizeBoundingBox, min_size: 1}
- {type: RandomIoUCrop}
- {type: SanitizeBoundingBoxes, min_size: 1}
- {type: RandomHorizontalFlip}
- {type: Resize, size: [640, 640], }
# - {type: Resize, size: 639, max_size: 640}
# - {type: PadToSize, spatial_size: 640}
- {type: ToImageTensor}
- {type: ConvertDtype}
- {type: SanitizeBoundingBox, min_size: 1}
- {type: ToImage}
- {type: ToDtype}
- {type: SanitizeBoundingBoxes, min_size: 1}
- {type: ConvertBox, out_fmt: 'cxcywh', normalize: True}
shuffle: True
batch_size: 4
Expand All @@ -31,8 +31,8 @@ val_dataloader:
# - {type: Resize, size: 639, max_size: 640}
# - {type: PadToSize, spatial_size: 640}
- {type: Resize, size: [640, 640]}
- {type: ToImageTensor}
- {type: ConvertDtype}
- {type: ToImage}
- {type: ToDtype}
shuffle: False
batch_size: 8
num_workers: 4
Expand Down
4 changes: 2 additions & 2 deletions rtdetr_pytorch/configs/rtdetr/include/rtdetr_r50vd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ RTDETRPostProcessor:


SetCriterion:
weight_dict: {loss_vfl: 1, loss_bbox: 5, loss_giou: 2,}
losses: ['vfl', 'boxes', ]
weight_dict: {loss_vfl: 1, loss_bbox: 5, loss_giou: 2, loss_angles: 3}
losses: ['vfl', 'boxes', 'angles']
alpha: 0.75
gamma: 2.0

Expand Down
2 changes: 1 addition & 1 deletion rtdetr_pytorch/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
torch==2.0.1
torchvision==0.15.2
torchvision==0.16.0
onnx==1.14.0
onnxruntime==1.15.1
pycocotools
Expand Down
19 changes: 19 additions & 0 deletions rtdetr_pytorch/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from setuptools import setup, find_packages

setup(
name='rtrdetr',
version='0.2a5',
author='Your Name',
author_email='your.email@example.com',
description='A short description of the package',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://example.com/your-package',
packages=find_packages(),
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
python_requires='>=3.6',
)
5 changes: 2 additions & 3 deletions rtdetr_pytorch/src/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

from . import data
from . import data
from . import nn
from . import optim
from . import zoo
from . import zoo
Loading