import React, { Component } from 'react' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import { Loader } from '../common' import * as actions from './faceSearch.actions' class FaceSearchQuery extends Component { state = { image: null } upload(e) { const { payload } = this.props const files = e.dataTransfer ? e.dataTransfer.files : e.target.files let i let file for (i = 0; i < files.length; i++) { file = files[i] if (file && file.type.match('image.*')) break } if (!file) return var fr = new FileReader(); fr.onload = () => { fr.onload = null this.setState({ image: fr.result }) } fr.readAsDataURL(files[0]); this.props.actions.upload(this.props.payload, file) } render() { const { result } = this.props const { image } = this.state const style = {} if (image) { style.backgroundImage = 'url(' + image + ')' style.backgroundSize = 'cover' } return (
{result.loading ?
:
}

Search This Dataset

Searching {13456} images

Use facial recognition to reverse search into the LFW dataset and see if it contains your photos.

  1. Upload a photo of yourself
  2. Use a photo similar to examples below
  3. Only matches over 85% will be displayed
  4. Read more tips to improve search results
  5. Your search data is never stored and immediately cleared once you leave this page.

Read more about privacy.

) } } const mapStateToProps = state => ({ result: state.faceSearch.result, options: state.faceSearch.options, }) const mapDispatchToProps = dispatch => ({ actions: bindActionCreators({ ...actions }, dispatch), }) export default connect(mapStateToProps, mapDispatchToProps)(FaceSearchQuery)