Added skip on corrupt images
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
756272ea6a
commit
ca956cc8af
@ -20,7 +20,7 @@ At this point, port 8123 will be supporting the photo app.
|
||||
#### Upgrade Node
|
||||
|
||||
```bash
|
||||
wget -qO- https://deb.nodesource.com/setup_8.x | sudo bash -
|
||||
wget -qO- https://deb.nodesource.com/setup_10.x | sudo bash -
|
||||
sudo apt-get install --yes nodejs
|
||||
```
|
||||
|
||||
|
@ -147,6 +147,14 @@ faceapi.nets.ssdMobilenetv1.loadFromDisk('./models')
|
||||
},
|
||||
});
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.warn("Skipping out on image " + photoPath + " and marking to 0 faces to prevent future scanning.");
|
||||
return photoDB.sequelize.query("UPDATE photos SET faces=:faces WHERE id=:id", {
|
||||
replacements: {
|
||||
id: photo.id,
|
||||
faces: 0
|
||||
},
|
||||
});
|
||||
}).then(() => {
|
||||
processed++;
|
||||
const now = Date.now();
|
||||
|
Loading…
x
Reference in New Issue
Block a user