Skip to content

Commit 3cb4b4e

Browse files
authored
Fix Codespell (#2899)
1 parent cfbaaf6 commit 3cb4b4e

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

deeplabcut/modelzoo/video_inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def video_inference_superanimal(
231231
)
232232
233233
Tips:
234-
* max_individuals: make sure you correclty give the number of individuals. Our
234+
* max_individuals: make sure you correctly give the number of individuals. Our
235235
inference api will only give up to max_individuals number of predictions.
236236
* pseudo_threshold: the higher you set, the more aggressive you filter low
237237
confidence predictions during video adaptation.

deeplabcut/pose_estimation_pytorch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ When `deeplabcut.pose_estimation_pytorch.apis.analyze_videos.video_inference` is
462462
with a top-down model, it is assumed that a detector snapshot is given as well to obtain
463463
bounding boxes with which to run pose estimation. It's possible that you've already
464464
obtained bounding boxes for your video (with another object detector or through some
465-
other means), and you want to re-use those bounding boxes instead of running an object
465+
other means), and you want to reuse those bounding boxes instead of running an object
466466
detector again.
467467

468468
You can easily do so by writing a bit of custom code, as shown in the example below:

deeplabcut/pose_estimation_pytorch/models/backbones/cspnext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class CSPNeXt(HuggingFaceWeightsMixin, BaseBackbone):
6060
out_indices: The branch indices to output. If a tuple of integers, the outputs
6161
are returned as a list of tensors. If a single integer, a tensor is returned
6262
containing the configured index.
63-
channel_attention: Add chanel attention to all stages
63+
channel_attention: Add channel attention to all stages
6464
norm_layer: The type of normalization layer to use.
6565
activation_fn: The type of activation function to use.
6666
**kwargs: BaseBackbone kwargs.

deeplabcut/pose_estimation_pytorch/models/target_generators/sim_cc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def _generate_standard(
147147
target_y = np.zeros((N, K, H), dtype=np.float32)
148148

149149
for n, k in product(range(N), range(K)):
150-
# skip unlabled keypoints
150+
# skip unlabeled keypoints
151151
if keypoints_visible[n, k] < 0.5:
152152
continue
153153

@@ -204,7 +204,7 @@ def _generate_gaussian(
204204
y = np.arange(0, H, 1, dtype=np.float32)
205205

206206
for n, k in product(range(N), range(K)):
207-
# skip unlabled keypoints
207+
# skip unlabeled keypoints
208208
if keypoints_visible[n, k] < 0.5:
209209
continue
210210

deeplabcut/utils/pseudo_label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def dlc3predictions_2_annotation_from_video(
402402
# skipping every 4 frames should speed up and not impact the performance
403403
predictions, image_paths = predictions[::10], image_paths[::10]
404404

405-
# because inference api does not return image path. I am assuming the predictions come in an oder from the video
405+
# Since the inference API does not return the image path, I assume the predictions are provided in the same order as the frames in the video.
406406
assert len(image_paths) == len(
407407
predictions
408408
), f"number of images must be equal to number of predictions. image_paths: {len(image_paths)} , predictions: {len(predictions)}"

examples/COLAB/COLAB_YOURDATA_SuperAnimal.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@
497497
"\n",
498498
"**SuperAnimal transfer-learning** The encoder was pre-trained first from ImageNet, then in pose datasets we colleceted. Then decoder is trained from scratch in downstream tasks.\n",
499499
"\n",
500-
"**SuperAnimal naive fine-tuning** Both the encoder and the decoder were pre-trained in pose datasets we collected. In downstream datsets, we only finetune convolutional channels that correspond to the annotated keypoints in the downstream datasets. This introduces catastrophic forgetting in keypoints that are not annotated in the downstream datasets.\n",
500+
"**SuperAnimal naive fine-tuning** Both the encoder and the decoder were pre-trained in pose datasets we collected. In downstream datasets, we only finetune convolutional channels that correspond to the annotated keypoints in the downstream datasets. This introduces catastrophic forgetting in keypoints that are not annotated in the downstream datasets.\n",
501501
"\n",
502502
"**SuperAnimal memory-replay fine-tuning** If we apply fine-tuning with SuperAnimal without further cares, the models will forget about keypoints that are not annotated in the downstream datasets. To mitigate this, we mix the annotations and zero-shot predictions of SuperAnimal models to create a dataset that 'replays' the memory of the SuperAnimal keypoints.\n",
503503
"\n",
@@ -785,7 +785,7 @@
785785
"source": [
786786
"#### Setup the weight init and dataset\n",
787787
"\n",
788-
"First we do keypoint matching. This steps make it possible to understand the correspondance between the existing annotations and SuperAnimal annotations. This step produces 3 outputs\n",
788+
"First we do keypoint matching. This steps make it possible to understand the correspondence between the existing annotations and SuperAnimal annotations. This step produces 3 outputs\n",
789789
"- The confusion matrix\n",
790790
"- The conversion table\n",
791791
"- Pseudo predictions over the whole dataset"
@@ -799,7 +799,7 @@
799799
"source": [
800800
"#### What is keypoint matching?\n",
801801
"\n",
802-
"Because SuperAnimal models have their pre-defined keypoints that are potentially different from your annotations, we porposed this algorithm to minimize the gap between the model and the dataset. We use our model to perform zero-shot inference on the whole dataset. This gives pairs of predictions and ground truth for every image. Then, we cast the matching between models’ predictions (2D coordinates)\n",
802+
"Because SuperAnimal models have their pre-defined keypoints that are potentially different from your annotations, we proposed this algorithm to minimize the gap between the model and the dataset. We use our model to perform zero-shot inference on the whole dataset. This gives pairs of predictions and ground truth for every image. Then, we cast the matching between models’ predictions (2D coordinates)\n",
803803
"and ground truth as bipartitematching using the Euclidean distance as the cost between paired of keypoints. We then solve the matching using the Hungarian algorithm. Thus for every image, we end up getting a matching matrix where 1 counts formatch and 0 counts for non-matching. Because the models’ predictions can be noisy from image to image, we average the aforementioned matching matrix across all the images and perform another bipartite matching, resulting in the final keypoint conversion table between the model and the dataset. Note that the quality of thematching will impact the performance\n",
804804
"of the model, especially for zero-shot. In the case where, e.g., the annotation nose is mistakenly converted to keypoint tail and vice versa, the model will have to unlearn the channel that corresponds to nose and tail (see also case study in Mathis et al.)."
805805
]
@@ -843,7 +843,7 @@
843843
"source": [
844844
"#### Display the confusion matrix\n",
845845
"\n",
846-
"The x axis lists the keypoints in the existing annotations. The y axis lists the keypoints in SuperAnimal keypoint space. Darker color encodes stronger correspondance between the human annotation and SuperAnimal annotations."
846+
"The x axis lists the keypoints in the existing annotations. The y axis lists the keypoints in SuperAnimal keypoint space. Darker color encodes stronger correspondence between the human annotation and SuperAnimal annotations."
847847
]
848848
},
849849
{
@@ -871,7 +871,7 @@
871871
},
872872
"source": [
873873
"#### Display the conversion table\n",
874-
"The gt columns represents the keypoint names in the existing dataset. The MasterName represents the correspoinding keypoints in SuperAnimal keypoint space."
874+
"The gt columns represents the keypoint names in the existing dataset. The MasterName represents the corresponding keypoints in SuperAnimal keypoint space."
875875
]
876876
},
877877
{

0 commit comments

Comments
 (0)