# function to download and extract the dataset def download_and_extract_dataset(url, extract_to='.'): local_filename = url.split('/')[-1] with requests.get(url, stream=True) as r: r.raise_for_status() with open(local_filename, 'wb') as f: for chunk in r.iter_content(chunk_size=8192): f.write(chunk) with zipfile.ZipFile(local_filename, 'r') as zip_ref: zip_ref.extractall(extract_to) os.remove(local_filename) # Download and extract the dataset dataset_url = 'https://github.com/REN382333467/NUPT-FPV/archive/refs/heads/main.zip' download_and_extract_dataset(dataset_url)