Skip to content

Commit

Permalink
Update project configuration and inference settings; modify instance …
Browse files Browse the repository at this point in the history
…version and add requirements for training
  • Loading branch information
cxnt committed Dec 4, 2024
1 parent 0739562 commit d2242c9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// "APP_NAME": "Train RT-DETR",
"TEAM_ID": "8",
"WORKSPACE_ID": "349",
"PROJECT_ID": "42201"
"PROJECT_ID": "43192"
}
},
{
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git+https://github.com/supervisely/supervisely.git@train-app-progress
2 changes: 1 addition & 1 deletion supervisely_integration/serve/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"license": {
"type": "Apache-2.0"
},
"instance_version": "6.11.22"
"instance_version": "6.12.12"
}
3 changes: 2 additions & 1 deletion supervisely_integration/serve/rtdetrv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def _predict_pytorch(
with Timer() as preprocess_timer:
imgs_pil = [Image.fromarray(img) for img in images_np]
orig_target_sizes = torch.as_tensor([img.size for img in imgs_pil]).to(self.device)
samples = torch.stack(self.transforms(imgs_pil)).to(self.device)
transformed_imgs = [self.transforms(img) for img in imgs_pil]
samples = torch.stack(transformed_imgs).to(self.device)
# 2. Inference
with Timer() as inference_timer:
outputs = self.model(samples)
Expand Down
2 changes: 1 addition & 1 deletion supervisely_integration/train/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"poster": "https://github.com/user-attachments/assets/ae6ec55e-63eb-43d1-99de-f62650939c69",
"description": "Train RT-DETR model on your data",
"docker_image": "supervisely/rt-detrv2:1.0.0",
"instance_version": "6.11.22",
"instance_version": "6.12.12",
"task_location": "workspace_tasks",
"need_gpu": true,
"gpu": "required",
Expand Down
2 changes: 1 addition & 1 deletion supervisely_integration/train/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
f"{base_path}/app_options.yaml",
)

inference_settings = {"confidence_threshold": 0.4}
inference_settings = {"confidence_threshold": 0}
train.register_inference_class(RTDETRv2Benchmark, inference_settings)

# For debug
Expand Down

0 comments on commit d2242c9

Please sign in to comment.