You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As tutorial says,for getting down-sized pics we should run build_database.py.However,a small problem occurred because Linux and Windows use different file directory separation mark.Function below should change filename.split('/')[-1])) into filename.split('\\')[-1])) while using Windows.
def resize_and_save(filename, output_dir, size=SIZE):
"""Resize the image contained in `filename` and save it to the `output_dir`"""
image = Image.open(filename)
# Use bilinear interpolation instead of the default "nearest neighbor" method
image = image.resize((size, size), Image.BILINEAR)
image.save(os.path.join(output_dir, filename.split('/')[-1]))
The text was updated successfully, but these errors were encountered:
As tutorial says,for getting down-sized pics we should run build_database.py.However,a small problem occurred because Linux and Windows use different file directory separation mark.Function below should change
filename.split('/')[-1]))
intofilename.split('\\')[-1]))
while using Windows.The text was updated successfully, but these errors were encountered: