lstrlq vor 5 Monaten
Ursprung
Commit
400ba43c5c
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  1. 2 1
      models/line_detect/line_dataset.py
  2. 2 2
      models/line_detect/train.yaml

+ 2 - 1
models/line_detect/line_dataset.py

@@ -52,7 +52,8 @@ class LineDataset(BaseDataset):
         img_path = os.path.join(self.img_path, self.imgs[index])
         if self.data_type == 'tiff':
             lbl_path = os.path.join(self.lbl_path, self.imgs[index][:-4] + 'json')
-            img = imageio.v3.imread(img_path).reshape(512, 512, 1)
+            # img = imageio.v3.imread(img_path).reshape(512, 512, 1)
+            img = imageio.v3.imread(img_path)[:, :, -1].reshape(512, 512, 1)
             img_3channel = np.zeros((512, 512, 3), dtype=img.dtype)
             img_3channel[:, :, 2] = img[:, :, 0]
 

+ 2 - 2
models/line_detect/train.yaml

@@ -1,7 +1,7 @@
 io:
   logdir: train_results
-  datadir: \\192.168.50.222\share\lm\Dataset_all
-  data_type: jpg
+  datadir: /data/share/rlq/datasets/250705
+  data_type: tiff
 #  datadir: D:\python\PycharmProjects\data_20250223\0423_
 #  datadir: I:\datasets\wirenet_1000