Website Acceleration Best Practice -Reduce DNS search

2023-03-14  

Recently, when training your own dataset, training is always interrupted, and an error prompt

Expected image (JPEG, PNG, or GIF), got unknown format starting with '\000\000\000\001Bud1\000\000 \000\000\000\010\000'

According to the error message prompt, when reading local files in the Python language, the picture folder contains files in non -JPEG, PNG, GIF format, which causes invalid reading.

Just delete the non -JPEG, PNG, GIF format files in the folder. However, after I checked many times, I still found no other documents, but each training still reported an error. Finally, I had a clever movement and tried to traverse each picture in the read folder. When reading the non -picture file, an error will be reported. Finally, the error will be reported. Delete, it feels painful. Essence Essence Essence Essence

import os
import tensorflow as tf
from PIL import Image
# Image saving address
path = "D:/picture/"
num = 1  # Name variable
for file in os.listdir(path + 'A'):
    image = Image.open("D:/pictur/A/"+ file)
for file in os.listdir(path + 'B'):
    image = Image.open("D:/pictur/B/"+ file)
    

source

Related Posts

Convert WAV, APE, FLAC Music is MP3, M4A (MP4) format Novice

1-Clawry-I don’t believe it can be found

Custom packaging drop -down component CC

Debug Ambari-Server Summary

Website Acceleration Best Practice -Reduce DNS search

Random Posts

LotusScript basics

Video: blockchain + cloud computing + youth entrepreneurial, ABT Seattle Weekend continuously | ArcBlock activities

LotusScript basics

python output is a ingensed number problem

IE8 semantic method