Skip to content

Commit fb1d77e

Browse files
committed
Fixing bug with batches of size 1, no need for a special case anymore
Adding more explanations in Tierpsy doc Increase version
1 parent dc01a40 commit fb1d77e

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

docs/source/tierpsy.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ Each subdirectory contains one video, the file tree should look like below (note
2525
2626
For using `Open Worm Movement Database <http://movement.openworm.org/>`__ videos from the `Zenodo <https://zenodo.org/>`__ website, we provide a `download script <https://github.com/iteal/wormpose_data/tree/main/datasets/tierpsy>`__ that will create the file tree described above.
2727

28-
**Limitations**
28+
**Limitations and troubleshooting**
2929

3030
Please use the option "extract timestamp" in Tierpsy so that the field "timestamp/raw" is set in the hdf5 file. The configuration without the timestamp is not currently supported in WormPose.
3131

3232
For Tierpsy files with several worm indexes per file, WormPose will only load one worm, the one with the smallest index.
3333

34-
**Troubleshooting**
34+
The Tierpsy coordinates loader uses the 'skeleton' key of the file {video_name}_features.hdf5 or {video_name}_featuresN.hdf5. Please verify that the coordinates of this table are in pixels and not microns or another unit. You may need to leave the default value of Microns Per Pixel = -1.00 in Tierpsy so that the skeletons values stay in image pixel coordinates.
3535

36-
Please contact the authors for any problems loading Tierpsy tracker files. Some features may not be implemented.
36+
Please contact the authors for any problems loading Tierpsy tracker files. Some features may not be implemented, the notebook check_dataset.ipynb is a good starting point to troubleshoot Tierpsy dataset loading issues.
3737

3838
**Advanced use**
3939

wormpose/images/scoring/results_scoring.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,6 @@ def __call__(
8282
with open(result_filename, "rb") as f:
8383
results_scores, results_skel = pickle.load(f)
8484

85-
# handle case for results containing one centerline
86-
if len(results_scores.shape) == 1:
87-
results_scores = results_scores[:, np.newaxis]
88-
if len(results_skel.shape) == 3:
89-
results_skel = results_skel[:, np.newaxis]
90-
9185
matching_scores.append(results_scores)
9286
matching_skeletons.append(results_skel)
9387
os.remove(result_filename)
@@ -195,10 +189,6 @@ def _compare_pred_real(
195189
all_scores[index][flip_index] = score
196190
all_skel[index][flip_index] = synth_skel
197191

198-
# for one centerline case
199-
all_scores = all_scores.squeeze()
200-
all_skel = all_skel.squeeze()
201-
202192
out_filename = os.path.join(temp_dir, f"compare_results_{chunk_index:09d}.pkl")
203193

204194
with open(out_filename, "wb") as f:

wormpose/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.0"
1+
__version__ = "1.3.0"

0 commit comments

Comments
 (0)