Skip to content

Commit 749e626

Browse files
Merge pull request #202 from fastlabel/feature/learning-from-dataset-unet
feat: api resize option
2 parents 726da07 + 0b3d937 commit 749e626

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,9 +3099,11 @@ Get training jobs.
30993099
```python
31003100
training_job = client.execute_training_job(
31013101
dataset_name="dataset_name",
3102-
base_model_name="fastlabel_object_detection_light", // "fastlabel_object_detection_light" or "fastlabel_object_detection_high_accuracy"
3102+
base_model_name="fastlabel_object_detection_light", // "fastlabel_object_detection_light" or "fastlabel_object_detection_high_accuracy" or "fastlabel_u_net_general"
31033103
epoch=300,
3104-
use_dataset_train_val=True
3104+
use_dataset_train_val=True,
3105+
resize_option="fixed", // optional, "fixed" or "none"
3106+
resize_dimension=1024, // optional, 512 or 1024
31053107
)
31063108

31073109
```

fastlabel/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import re
77
from concurrent.futures import ThreadPoolExecutor
88
from pathlib import Path
9-
from typing import List, Optional, Union
9+
from typing import List, Literal, Optional, Union
1010

1111
import aiohttp
1212
import cv2
@@ -4248,6 +4248,8 @@ def execute_training_job(
42484248
instance_type: str = "ml.p3.2xlarge",
42494249
batch_size: int = None,
42504250
learning_rate: float = None,
4251+
resize_option: Optional[Literal["fixed", "none"]] = None,
4252+
resize_dimension: Optional[int] = None,
42514253
) -> list:
42524254
"""
42534255
Returns a list of training jobs.
@@ -4266,6 +4268,8 @@ def execute_training_job(
42664268
"instanceType": instance_type,
42674269
"batchSize": batch_size,
42684270
"learningRate": learning_rate,
4271+
"resizeOption": resize_option,
4272+
"resizeDimension": resize_dimension,
42694273
}
42704274

42714275
return self.api.post_request(

0 commit comments

Comments
 (0)