Skip to content

Commit

Permalink
Merge branch 'siz2' into siz
Browse files Browse the repository at this point in the history
  • Loading branch information
BarzaH committed Feb 9, 2024
2 parents deecf26 + 9c7b715 commit 0b80b00
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 26 deletions.
1 change: 1 addition & 0 deletions config/experiments/detection/IM_130124_gdsfjbjh2_siz.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# @package _global_
accelerator: gpu
batch_size: 32
ckpt_path: /home/qazybek/pmi_tatneft/innofw/dui/logs/something/20240122-093931/weights/best.pt
defaults:
- override /datasets: detection/detection_siz.yaml
- override /models: detection/yolov5.yaml
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# @package _global_
batch_size: 2
defaults:
- override /models: detection/yolov5
- override /datasets: detection/detection_rotten_fruits


project: "rotten_fruits"
task: "image-detection"
- override /models: detection/yolov5
- override /datasets: detection/detection_rotten_fruits
epochs: 3
project: rotten_fruits
random_seed: 43
epochs: 300
batch_size: 2
task: image-detection
weights_freq: 1

ckpt_path: /tmp/chkpt
15 changes: 7 additions & 8 deletions config/experiments/detection/KA_120722_8adfcdaa_yolov5.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# @package _global_
batch_size: 32
defaults:
- override /models: detection/yolov5
- override /datasets: detection_lep
- override /optimizers: sgd

project: "lep"
task: "image-detection"
- override /datasets: detection_lep
- override /optimizers: sgd
- override /models: detection/yolov5x.yaml
epochs: 500
project: lep
random_seed: 42
epochs: 2
batch_size: 2
task: image-detection
weights_freq: 1
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# @package _global_
batch_size: 2
ckpt_path: /home/qazybek/pmi_tatneft/innofw/dui/logs/something/20240122-082640/weights/best.pt
defaults:
- override /models: detection/yolov5
- override /datasets: detection_lep.yaml
- override /initializations: random
epochs: 1
epochs: 5
project: lep
random_seed: 42
task: image-detection
Expand Down
17 changes: 11 additions & 6 deletions innofw/core/integrations/ultralytics/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path
from typing import List, Optional
import shutil
import glob

# third party libraries
from sklearn.model_selection import train_test_split
Expand Down Expand Up @@ -212,12 +213,16 @@ def setup_infer(self):
return
# root_dir
self.infer_source = Path(self.infer_source)
if self.infer_file:
self.infer_source = (
self.infer_source
if self.infer_source.name == Path(self.infer_file).stem
else self.infer_source / Path(self.infer_file).stem
)
# if self.infer_file:
# self.infer_source = (
# self.infer_source
# if self.infer_source.name == Path(self.infer_file).stem
# else self.infer_source / Path(self.infer_file).stem
# )
for path in self.infer_source.rglob("*"):
if path.is_file() and path.suffix not in [".txt", ".yaml", ".zip"]:
self.infer_source = Path(path).parent
break

root_path = self.infer_source.parent

Expand Down
2 changes: 1 addition & 1 deletion logging.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ formatter=simpleFormatter
args=(sys.stdout,)

[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s

0 comments on commit 0b80b00

Please sign in to comment.