Spaces:
Sleeping
Sleeping
Abid Ali Awan
commited on
Commit
·
f784181
1
Parent(s):
0b9a94a
Update data path handling and remove unused example assets
Browse files- Modified the `create_data` function to accept a more general data path, enhancing flexibility in data loading.
- Updated the data variable to point to the new examples directory.
- Removed unused image assets (cover.png, favicon.ico, SavtaDepth.png) from the examples directory to clean up the project.
These changes streamline data management and reduce clutter in the project structure.
- app/app_savta.py +3 -3
- examples/SavtaDepth.png +0 -0
- examples/cover.png +0 -0
- examples/favicon.ico +0 -0
app/app_savta.py
CHANGED
|
@@ -39,9 +39,9 @@ def get_y_fn(x: Path) -> Path:
|
|
| 39 |
|
| 40 |
|
| 41 |
def create_data(data_path: Path):
|
| 42 |
-
fnames = get_files(data_path
|
| 43 |
return ImageImageDataLoaders.from_label_func(
|
| 44 |
-
data_path
|
| 45 |
seed=42,
|
| 46 |
bs=4,
|
| 47 |
num_workers=0,
|
|
@@ -50,7 +50,7 @@ def create_data(data_path: Path):
|
|
| 50 |
)
|
| 51 |
|
| 52 |
|
| 53 |
-
data = create_data(Path("
|
| 54 |
learner = unet_learner(
|
| 55 |
data,
|
| 56 |
resnet34,
|
|
|
|
| 39 |
|
| 40 |
|
| 41 |
def create_data(data_path: Path):
|
| 42 |
+
fnames = get_files(data_path, extensions=".jpg")
|
| 43 |
return ImageImageDataLoaders.from_label_func(
|
| 44 |
+
data_path,
|
| 45 |
seed=42,
|
| 46 |
bs=4,
|
| 47 |
num_workers=0,
|
|
|
|
| 50 |
)
|
| 51 |
|
| 52 |
|
| 53 |
+
data = create_data(Path("examples"))
|
| 54 |
learner = unet_learner(
|
| 55 |
data,
|
| 56 |
resnet34,
|
examples/SavtaDepth.png
DELETED
|
Binary file (20.3 kB)
|
|
|
examples/cover.png
DELETED
|
Binary file (27.2 kB)
|
|
|
examples/favicon.ico
DELETED
|
Binary file (15.4 kB)
|
|
|