It will depend on the kind of duplicates you have. If the duplicates are exact copies with the same file attributes (same filename, dates, file size for example), Photos will warn you, if the same file is already in your Photos Library, because it compares the new imports to the photos already in the library. But Photos will not check for similar photos - if you have the same photo in different states of edit or downsized.
To use the built-in duplicate detection on import, do not import the photos all at once, but in smaller groups, since Photos is not looking for duplicates among the photos it is going to import, but comparing the current import to the photos already in the library. Import each folder separately.