train_faces job failing, even with multiple people created
See original GitHub issueWhen Submitting please remove every thing above this line
🐛 Bug Report
- [ x ] I am including my log files in the issue.
- [ x ] I have looked for similar issues among all the former issues including closed ones.
What Operating system and version is LibrePhotos running on:
Debian/Docker
What architecture is LibrePhotos running on:
x64
How is LibrePhotos installed:
Docker - using dev tag
If running via Docker or Kubernetes please list version including docker-compose:
version: '3.8'
services:
proxy:
image: reallibrephotos/librephotos-proxy:${tag}
restart: always
volumes:
# - /home/docker/librephotos/photos:/data
- nas-images:/data
- librephotos-protected:/protected_media
ports:
- ${httpPort}:80
depends_on:
- backend
- frontend
frontend:
image: reallibrephotos/librephotos-frontend:${tag}
restart: always
depends_on:
- backend
backend:
image: reallibrephotos/librephotos:${tag}
restart: always
volumes:
- nas-images:/data
- librephotos-protected:/protected_media
- ${logLocation}:/logs
- ${cachedir}:/root/.cache
environment:
- SECRET_KEY=${shhhhKey}
- BACKEND_HOST=backend
- ADMIN_EMAIL=${adminEmail}
- ADMIN_USERNAME=${userName}
- ADMIN_PASSWORD=${userPass}
- DB_BACKEND=postgresql
- DB_NAME=${dbName}
- DB_USER=${dbUser}
- DB_PASS=${dbPass}
- DB_HOST=database.triplusnet.home
- DB_PORT=5432
- REDIS_HOST=redis
- REDIS_PORT=6379
- MAPBOX_API_KEY=${mapApiKey}
- TIME_ZONE=${timeZone}
- WEB_CONCURRENCY=${gunniWorkers}
#- SKIP_PATTERNS=${skipPatterns}
- DEBUG=0
- HEAVYWEIGHT_PROCESS=${HEAVYWEIGHT_PROCESS}
redis:
image: redis:6
restart: always
volumes:
nas-images:
driver: local
driver_opts:
type: cifs
o: "username=librepho,password=xxx,rw"
device: "//192.168.1.10/Photos"
librephotos-protected:
driver: local
driver_opts:
type: cifs
o: "username=librepho,password=xxx,rw"
device: "//192.168.1.10/librephotos-work"
Are you running LibrePhotos on a virtual machine if so please list:
Proxmox VM running docker
How is you picture library mounted on the host (or in the virtual machine):
Local file system (Type), NFS, or SMB SMB
Description of issue:
After running a scan, the train_faces job triggers and fails with below error message.
Looking into issue https://github.com/LibrePhotos/librephotos/issues/29, however I have multiple faces/people labeled

06:47:02 default: api.face_classify.train_faces(<User: triplus>, UUID('55894a1b-c1ab-474a-ae49-f3296c7d213c')) (ee757aef-3e58-406f-bef2-f46563e29387)
[ERR] Expected 2D array, got 1D array instead:
.
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
2022-07-27 08:23:49,914 : face_classify.py : train_faces : 286 : ERROR : An error occurred
Traceback (most recent call last):
File "/code/api/face_classify.py", line 245, in train_faces
probs = clf.predict_proba(face_encodings_unknown_np)
File "/usr/local/lib/python3.9/dist-packages/sklearn/neural_network/_multilayer_perceptron.py", line 1252, in predict_proba
y_pred = self._forward_pass_fast(X)
File "/usr/local/lib/python3.9/dist-packages/sklearn/neural_network/_multilayer_perceptron.py", line 160, in _forward_pass_fast
X = self._validate_data(X, accept_sparse=["csr", "csc"], reset=False)
File "/usr/local/lib/python3.9/dist-packages/sklearn/base.py", line 577, in _validate_data
X = check_array(X, input_name="X", **check_params)
File "/usr/local/lib/python3.9/dist-packages/sklearn/utils/validation.py", line 879, in check_array
raise ValueError(
ValueError: Expected 2D array, got 1D array instead:
array=[].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
How can we reproduce it:
Run ‘scan photos’
Additional Information:
- Include a ZIP file containing your
logfiles. - Provide pictures or links to videos that clearly demonstrate the issue.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
"You Can't Work 2 Jobs. That's Stealing" - YouTube
This tech CEO fired 2 engineers for having a second full-time job, claiming it's unethical and the employees are practically *stealing* from ...
Read more >[WinError 3] The system cannot find the path specified While ...
I have saved the file in a folder as stated in the code but even though this error occurs. Whenever I try to...
Read more >California's scaled-back high-speed rail plan faces doubts ...
The project will face a tough hurdle if weak revenues and rising costs drive a request for more money to just complete the...
Read more >Denver airport train faces safety concerns amid crossing gate ...
The problems — including gates that drop when no train is approaching an intersection and gates that didn't fully drop before a train...
Read more >Face recognition using OpenCV and Python: A beginner's guide
I'll explain the nerdy theory of OpenCV's three built-in face recognizers ... Recognition: Feed new faces of that people and see if the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Correct, all my faces are labelled.
stupid question - if I re-pull the dev image, do I already get your changes, or how does the development process happen? 😃
thanks guys!