Mount the NAS share in Finder with the correct credentials. Select a narrow folder rather than the entire server.
Network latency makes size calculation, hashing, and photo comparison slower. Keep the Mac and server connected and avoid concurrent large transfers.
Server-side snapshots, recycle bins, links, deduplication, and quotas can make reported logical size differ from physical use.
Do not remove shared files without coordinating collaborators and server backups.
If the share disconnects, discard the old result and run a new scan after remounting.