Skip to content

Commit

Permalink
remove unused classes
Browse files Browse the repository at this point in the history
  • Loading branch information
am15h committed Jul 21, 2020
1 parent 3a7ad3b commit 5dd7419
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
13 changes: 0 additions & 13 deletions lib/ui/detection_preview.dart

This file was deleted.

12 changes: 0 additions & 12 deletions lib/ui/image_picker_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@ class _ImagePickerViewState extends State<ImagePickerView> {
void _predict() async {
var bytes = _image.readAsBytesSync();
img.Image imageInput = img.decodeImage(bytes);
TensorImage inputImage = TensorImage.fromImage(imageInput);
int padSize = max(inputImage.height, inputImage.width);
ImageProcessor imageProcessor = ImageProcessorBuilder()
.add(Rot90Op())
.add(ResizeWithCropOrPadOp(padSize, padSize))
.build();
inputImage = imageProcessor.process(inputImage);

Size s = MediaQuery.of(context).size;
print(
'W: ${s.width} H: ${imageInput.width * (s.width / imageInput.height)}');
// _imageWidget = Image.memory(img.PngEncoder().encodeImage(inputImage.image));
_imageWidget = Image.memory(bytes);
List<Recognition> results = _classifier.predict(imageInput);
print(results);
Expand Down

0 comments on commit 5dd7419

Please sign in to comment.