Quick guide to download and set up the Flickr8k dataset for custom training with Snaption.
Note: The dataset is only needed if you want to train your own models. If you're using our pre-trained models, you can skip this entirely!
-
Get Kaggle Account: Sign up at kaggle.com (free)
-
Download Dataset: Go to Flickr8k on Kaggle
- Click the "Download" button
- This downloads
archive.zip(~1GB)
-
Extract and Organize:
- Create an empty directory named
Flickr8kwithintraining/data. The path should betraining/data/Flickr8k. - Extract the downloaded
archive.zipfile's contents into this newly createdFlickr8kdirectory. - After extraction, the structure should look like this:
training/data/Flickr8k/ ├── captions.txt └── Images/ ├── image1.jpg └── ... (8,090 more images)
- Create an empty directory named
-
Verify: Ensure
captions.txtand theImages/folder with.jpgfiles are present intraining/data/Flickr8k/. -
Note: Please delete the first line of
captions.txtif it contains any header information.
# Download our trained models instead...
# See: https://github.com/Akhan521/Snaption/releases/tag/v0.1.0
# Quick start with pre-trained model:
pip install -e . # Install snaption package# Start training with the dataset you just downloaded:
cd training/
python train.py"Download failed" or "File not found"
- Make sure you're logged into Kaggle
- Try downloading manually from the website
- Check your internet connection
"No such file or directory"
- Make sure you extracted the zip file
- Check that the path
training/data/Flickr8k/exists - Verify the Images/ folder contains .jpg files
"Not enough space"
- The dataset needs ~1GB free space.
- Total Size: ~1GB
- Images: 8,091 photos from Flickr8k
- Captions: 5 captions per image (total 40,455 captions)
- License: Research/academic use
- Quality: Professional photography, diverse scenes
Q: Do I need the dataset to use Snaption?
A: No! Only if you want to train your own models. Use our pre-trained models instead.
Q: Can I use a different dataset?
A: Yes! Just follow the same captions.txt format. See training/dataset.py for details.
Q: Is this dataset free?
A: Yes, it's available for research and educational use.
Need help? Open an issue and I'll assist you!