Skip to content

Commit

Permalink
Fixing bug with batches of size 1, no need for a special case anymore
Browse files Browse the repository at this point in the history
Adding more explanations in Tierpsy doc
Increase version
  • Loading branch information
iteal committed Dec 9, 2021
1 parent dc01a40 commit fb1d77e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 3 additions & 3 deletions docs/source/tierpsy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Each subdirectory contains one video, the file tree should look like below (note
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.

**Limitations**
**Limitations and troubleshooting**

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.

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

**Troubleshooting**
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.

Please contact the authors for any problems loading Tierpsy tracker files. Some features may not be implemented.
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.

**Advanced use**

Expand Down
10 changes: 0 additions & 10 deletions wormpose/images/scoring/results_scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ def __call__(
with open(result_filename, "rb") as f:
results_scores, results_skel = pickle.load(f)

# handle case for results containing one centerline
if len(results_scores.shape) == 1:
results_scores = results_scores[:, np.newaxis]
if len(results_skel.shape) == 3:
results_skel = results_skel[:, np.newaxis]

matching_scores.append(results_scores)
matching_skeletons.append(results_skel)
os.remove(result_filename)
Expand Down Expand Up @@ -195,10 +189,6 @@ def _compare_pred_real(
all_scores[index][flip_index] = score
all_skel[index][flip_index] = synth_skel

# for one centerline case
all_scores = all_scores.squeeze()
all_skel = all_skel.squeeze()

out_filename = os.path.join(temp_dir, f"compare_results_{chunk_index:09d}.pkl")

with open(out_filename, "wb") as f:
Expand Down
2 changes: 1 addition & 1 deletion wormpose/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.0"
__version__ = "1.3.0"

0 comments on commit fb1d77e

Please sign in to comment.