File size: 609 Bytes
5b0f0dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
license: apache-2.0
base_model:
- google/efficientnet-b2
---

## Overview

Detects bad crop jobs and misalignments, like screenshots from phones that should be trimmed down to relevant details.

Version 8.

Training progress: https://wandb.ai/josephc/bad_crop/overview

## Usage:

```python
import numpy
import onnxruntime as ort
session = ort.InferenceSession("./bad_crop.onnx")
blank = numpy.zeros((1, 3, 224, 224), dtype=numpy.float32)
out = torch.softmax(torch.tensor(session.run(["output"], {"input": blank,})[0][0]), axis=0)
print(out)  # tensor([9.9941e-01, 5.8832e-04])  # Bad crop, good crop
```