AllenCell / AllenCell/allencell-segmenter-ml

Prediction failed using a model trained from scratch

Đang mở
#568 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
5
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Describe the bug
Prediction failed using a model trained from scratch

## To Reproduce
Steps to reproduce the behavior:
1. Train a model from scratch
2. Go to `Prediction` & run a prediction on an on-screen image
3. See error

## Expected behavior
A segmentation prediction should be generated without any error

## Screenshots
N/A

## Describe your data (image format, 2D /3D etc.)
Tried for:
- ome-tiff, single-channel, LaminB1 (nucleus)
- ome-tiff, multi-channel, LaminB1 (nucleus)

## Environment (please complete the following information):
- Winsegml2 EC2 instance
- OS: Window
- Plugin Version: iterative training fix 11/23/2024
- PyTorch version: -
- GPU? Yes
- CUDA version -

## Additional context
Error code below:
``` running
Initializing PersistentDataset for train at C:\Users\Administrator\Desktop\SegmenterML-testData\output-test-10\cache\train
Initializing PersistentDataset for val at C:\Users\Administrator\Desktop\SegmenterML-testData\output-test-10\cache\val
INFO: Using 16bit Automatic Mixed Precision (AMP)
INFO: Trainer already configured with model summary callbacks: []. Skipping setting a default `ModelSummary` callback.
INFO: GPU available: True (cuda), used: True
INFO: TPU available: False, using: 0 TPU cores
INFO: HPU available: False, using: 0 HPUs
INFO: Restoring states from the checkpoint path at C:\Users\Administrator\Desktop\segmenter-home\iterative-training_no-weigth-10\checkpoints\epoch_001.ckpt
INFO: LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
INFO: Loaded model weights from the checkpoint at C:\Users\Administrator\Desktop\segmenter-home\iterative-training_no-weigth-10\checkpoints\epoch_001.ckpt
Predicting ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1 0:00:01 • 0:00:00 0.00it/s
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File C:\ProgramData\miniconda3\envs\iterative-training\lib\site-packages\allencell_ml_segmenter\core\view.py:94, in View._onLongTaskThreadFinished(self=)
92 self.longTaskThread.deleteLater()
93 self.progressDialog.close()
---> 94 self.showResults()
self =

File C:\ProgramData\miniconda3\envs\iterative-training\lib\site-packages\allencell_ml_segmenter\prediction\view.py:186, in PredictionView.showResults(self=)
178 for data in stem_to_data.values():
179 raw_np_data: Optional[np.ndarray] = (
180 self._img_data_extractor.extract_image_data(
181 data["raw"], channel=channel
182 ).np_data
183 )
184 seg_np_data: Optional[np.ndarray] = (
185 self._img_data_extractor.extract_image_data(
--> 186 data["seg"], seg=1
np =
self =
self._img_data_extractor =
data = {'raw': WindowsPath('C:/Users/Administrator/Desktop/SegmenterML-testData/LaminB1-Variance-multiChannels-20241024T144528Z-001/image-2.tif')}
187 ).np_data
188 )
189 if raw_np_data is not None:
190 self._viewer.add_image(
191 raw_np_data,
192 f"[raw] {data['raw'].name}",
193 )

KeyError: 'seg'

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.