1adrianb / 1adrianb/face-alignment

Error in examples/demo.ipynb testing on a batch

Open Beginner friendly
#332 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.5k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

In "Testing on a batch":

```python
fig = plt.figure(figsize=(10, 5))
for i, pred in enumerate(preds):
plt.subplot(1, 2, i + 1)
plt.imshow(frames[1])
plt.title(f'frame[{i}]')
for detection in pred:
plt.scatter(detection[:,0], detection[:,1], 2)
```
the 2nd loop is redundant, need to plot `pred[:, 0], pred[:, 1]` only.

Contributor guide

No contributing guide indexed for this repository

Research direction

Open examples/demo.ipynb, locate the 'Testing on a batch' section. The issue points to a redundant loop: instead of iterating over detections, plot pred[:,0] and pred[:,1] directly. Check the surrounding code to understand the data shape, then correct the plotting. Run the notebook cell to verify the fix produces the expected visualization.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python, pytorch
Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.