Hi,
I am using Ais to create a training set from a .scns file. The GUI shows that both annotation masks and training boxes are present, but when I click Generate set, the exported .scnt file is always an empty TIFF with shape (0,).
What I did:
- Opened a .scns file in Ais: ais 2025080xxxxxx_Position_2_2_12.11Apx_d3.scns
- In the GUI, I created annotations for feature A.
- I added positive boxes for A and negative boxes for notB.
- The GUI shows:
- Positive samples: 31
- Negative samples: 59
- box size: 106 pixel
- I saved the .scns file.
- I reopened the saved .scns file and confirmed that the annotation masks and boxes are still visible.
- I clicked Generate set and saved the training set as: 106_A.scnt
Expected behavior:
The exported .scnt file should contain the extracted training patches, for example with a shape similar to:
(N, 2, box_size, box_size)
or another non-empty training-data array.
Actual behavior:
The exported .scnt file is always very small and contains an empty array:
Use:
python - <<'PY'
import os, tifffile
p = "106_A.scnt"
print("file size:", os.path.getsize(p))
a = tifffile.imread(p)
print("shape:", a.shape)
print("ndim:", a.ndim)
print("dtype:", a.dtype)
print("size:", a.size)
PY
Output:
file size: 296
shape: (0,)
ndim: 1
dtype: float64
size: 0
During export, Ais prints this warning in prompt:
/home/wl/.conda/envs/ais/lib/python3.9/site-packages/tifffile/tifffile.py:2357:
UserWarning: <tifffile.TiffWriter '106_A.scnt'> writing zero-size array to nonconformant TIFF
warnings.warn
Hi,
I am using Ais to create a training set from a .scns file. The GUI shows that both annotation masks and training boxes are present, but when I click Generate set, the exported .scnt file is always an empty TIFF with shape (0,).
What I did:
Expected behavior:
The exported .scnt file should contain the extracted training patches, for example with a shape similar to:
(N, 2, box_size, box_size)
or another non-empty training-data array.
Actual behavior:
The exported .scnt file is always very small and contains an empty array:
Use:
python - <<'PY'
import os, tifffile
p = "106_A.scnt"
print("file size:", os.path.getsize(p))
a = tifffile.imread(p)
print("shape:", a.shape)
print("ndim:", a.ndim)
print("dtype:", a.dtype)
print("size:", a.size)
PY
Output:
file size: 296
shape: (0,)
ndim: 1
dtype: float64
size: 0
During export, Ais prints this warning in prompt:
/home/wl/.conda/envs/ais/lib/python3.9/site-packages/tifffile/tifffile.py:2357:
UserWarning: <tifffile.TiffWriter '106_A.scnt'> writing zero-size array to nonconformant TIFF
warnings.warn