Skip to content

Clean up README.md, remove redundancies and fix code#229

Open
ganji759 wants to merge 1 commit intometa-pytorch:mainfrom
ganji759:main
Open

Clean up README.md, remove redundancies and fix code#229
ganji759 wants to merge 1 commit intometa-pytorch:mainfrom
ganji759:main

Conversation

@ganji759
Copy link
Copy Markdown

@ganji759 ganji759 commented Apr 7, 2026

Fixes made:

  1. Removed duplicate bird classifier code (was appearing twice)
  2. Fixed broken YOLO download code (added missing YOLO module and function calls)
  3. Reorganized into clear 5-step flow: Download → Convert → Deploy
  4. Fixed missing # Python comments
  5. Removed the stray "Run it from a regular terminal" text that was inside a code block

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 7, 2026
@kirklandsign
Copy link
Copy Markdown
Contributor

@claude review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Android YOLO/ExecuTorch README to remove duplicated content and present a clearer end-to-end workflow for downloading, converting, and deploying the models.

Changes:

  • Reformat README into a 5-step flow with clearer headings and code blocks.
  • Fix broken YOLO download snippets by adding the missing ultralytics.YOLO usage.
  • Clean up stray/duplicated text and improve section formatting (ADB instructions, feature lists).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Yolo/android/README.md
from transformers import AutoModelForImageClassification
import json

model = AutoModelForImageClassification.from_pretrained('./bird_classifier_model')
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract_species_names.py loads the classifier from ./bird_classifier_model, but Step 1 downloads/uses chriamue/bird-species-classifier and never creates a bird_classifier_model directory. This makes Step 4 non-runnable as written. Align Step 4 with Step 1 (load from the same HuggingFace repo), or explicitly add a Step 1 artifact-save (e.g., model.save_pretrained('./bird_classifier_model')) and reference that path consistently.

Suggested change
model = AutoModelForImageClassification.from_pretrained('./bird_classifier_model')
model = AutoModelForImageClassification.from_pretrained("chriamue/bird-species-classifier")

Copilot uses AI. Check for mistakes.
Comment thread Yolo/android/README.md
Comment on lines +55 to 68
### Step 2: Download YOLO Detection Model

Install Ultralytics:
The app supports both YOLOv8 and YOLOv26, and automatically detects which version you're using based on the model output format.

```
```bash
pip install ultralytics
```

### Download model

#### Option 1: v8
python -c "
from ultralytics import
model = ('v8n.pt') # nano version for mobile
print('v8 model downloaded')
"
```

#### Option 2: v26 (Recommended - Faster & More Accurate)
python -c "
from ultralytics import
model = ('26n.pt') # nano version for mobile
print('v26 model downloaded')
"
#### Option 1: YOLOv8
```python
from ultralytics import YOLO
model = YOLO('yolov8n.pt') # nano version for mobile
print('YOLOv8 model downloaded')
```
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 2 shows Python snippets for downloading YOLO weights, but doesn’t say how to execute them (they’re not a complete command like python -c ... nor a script to run). Consider either turning these into runnable commands / a small download_yolo.py + python download_yolo.py, or removing Step 2 entirely since Step 3 already loads the weights via YOLO('...') which will trigger a download if missing.

Copilot uses AI. Check for mistakes.
Comment thread Yolo/android/README.md
Comment on lines +59 to 62
```bash
pip install ultralytics
```

Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install ultralytics is listed both in Prerequisites and again in Step 2. To keep the flow concise and avoid redundancy, remove one of these (typically keep all installs in Prerequisites, and have Step 2 focus only on the download action).

Suggested change
```bash
pip install ultralytics
```

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants