Skip to content

Commit

Permalink
Improve documentation for Analyzer class
Browse files Browse the repository at this point in the history
  • Loading branch information
joeweiss committed May 12, 2023
1 parent c33df2a commit a5e84b4
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,24 @@ recording.analyze()
print(recording.detections)
```

`recording.detections` contains a list of detected species, along with time ranges and confidence value.

```bash
[{'common_name': 'House Finch',
'confidence': 0.5744,
'end_time': 12.0,
'scientific_name': 'Haemorhous mexicanus',
'start_time': 9.0},
{'common_name': 'House Finch',
'confidence': 0.4496,
'end_time': 15.0,
'scientific_name': 'Haemorhous mexicanus',
'start_time': 12.0}]
```

### Using a custom classifier with BirdNET-Analyzer

To use the a [model trained with BirdNET-Analyzer](https://github.com/kahst/BirdNET-Analyzer#training), use the `Analyzer` class.
To use a [model trained with BirdNET-Analyzer](https://github.com/kahst/BirdNET-Analyzer#training), pass your labels and model path to the `Analyzer` class.

```python
from birdnetlib import Recording
Expand All @@ -69,7 +84,7 @@ print(recording.detections)

### Using BirdNET-Lite

To use the BirdNET-Lite model, use the `LiteAnalyzer` class.
To use the legacy BirdNET-Lite model, use the `LiteAnalyzer` class.

```python
from birdnetlib import Recording
Expand All @@ -91,21 +106,6 @@ recording.analyze()
print(recording.detections) # Returns list of detections.
```

`recording.detections` contains a list of detected species, along with time ranges and confidence value.

```bash
[{'common_name': 'House Finch',
'confidence': 0.5744,
'end_time': 12.0,
'scientific_name': 'Haemorhous mexicanus',
'start_time': 9.0},
{'common_name': 'House Finch',
'confidence': 0.4496,
'end_time': 15.0,
'scientific_name': 'Haemorhous mexicanus',
'start_time': 12.0}]
```

### Utility classes

#### DirectoryAnalyzer
Expand Down

0 comments on commit a5e84b4

Please sign in to comment.