diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-12-18 01:03:10 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-12-18 01:03:10 +0100 |
| commit | 7b8e6f9a7d3eb36b72b53d5e754b9c7916b98ed7 (patch) | |
| tree | e0445a2709ecf07e770a9b0ddecb8eeb3d168931 /client/faceSearch/faceSearch.result.js | |
| parent | d3be915bc5725a36dee867b07404725177783460 (diff) | |
namesearchg
Diffstat (limited to 'client/faceSearch/faceSearch.result.js')
| -rw-r--r-- | client/faceSearch/faceSearch.result.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/client/faceSearch/faceSearch.result.js b/client/faceSearch/faceSearch.result.js index d63f3265..936bc8d2 100644 --- a/client/faceSearch/faceSearch.result.js +++ b/client/faceSearch/faceSearch.result.js @@ -32,6 +32,7 @@ class FaceSearchResult extends Component { render() { const { dataset } = this.props.payload const { query, distances, results, loading, error } = this.props.result + console.log(this.props.result) if (loading) { return ( <div className='result'> @@ -43,7 +44,7 @@ class FaceSearchResult extends Component { ) } if (error) { - console.log(error) + // console.log(error) let errorMessage = errors[error] || errors.error return ( <div className='result'>{errorMessage}</div> @@ -60,10 +61,21 @@ class FaceSearchResult extends Component { const els = results.map((result, i) => { const distance = distances[i] const { uuid } = result.uuid + const { x, y, w, h } = result.roi const { fullname, gender, description, images } = result.identity + const bbox = { + left: (100 * x) + '%', + top: (100 * y) + '%', + width: (100 * w) + '%', + height: (100 * h) + '%', + } + // console.log(bbox) return ( <div key={i}> - <img src={'https://megapixels.nyc3.digitaloceanspaces.com/v1/media/' + dataset + '/' + uuid + '.jpg'} /> + <div className='img'> + <img src={'https://megapixels.nyc3.digitaloceanspaces.com/v1/media/' + dataset + '/' + uuid + '.jpg'} /> + <div className='bbox' style={bbox} /> + </div> {fullname} {'('}{gender}{')'}<br/> {description}<br/> {courtesyS(images, 'image')}{' in dataset'}<br /> |
