Introduction to the Flickr Scraper Project
The Flickr Scraper is a Python-based tool developed to efficiently collect images from Flickr, tailored for those involved in computer vision tasks such as training YOLO models. By utilizing specific search criteria, it simplifies the task of gathering relevant images, making it an essential resource for researchers and developers.
Key Features
- Search Capability: Users can search for images on Flickr using simple keyword inputs.
- Direct Downloads: Images can be downloaded directly to compile datasets effectively.
- Efficient Data Collection: The tool streamlines the process of assembling training data specifically for YOLO models, enhancing productivity in machine learning projects.
Requirements
To use the Flickr Scraper, one must ensure that Python version 3.7 or later is installed. Key dependencies are listed within a requirements.txt
file, which can be installed via:
pip install -U -r requirements.txt
One of the essential packages required is flickrapi
.
Installation Steps
Setting up the Flickr Scraper is straightforward. Follow these instructions:
- Clone the repository:
git clone https://github.com/ultralytics/flickr_scraper
- Navigate into the project directory:
cd flickr_scraper
- Install the necessary dependencies:
pip install -U -r requirements.txt
How to Run the Flickr Scraper
Prior to running the script, you will need:
-
A Flickr API key, which can be obtained here.
-
Insert your API key and secret into the
flickr_scraper.py
file as follows:key = "YOUR_API_KEY" secret = "YOUR_API_SECRET"
-
Run the script with your chosen search criteria. For example, to fetch 10 images of "honeybees on flowers" and download them, use the command:
python3 flickr_scraper.py --search 'honeybees on flowers' --n 10 --download
This command will display progress and save the images to the
flickr_scraper/images
directory.
Licensing Information
Ultralytics provides two licensing options:
- AGPL-3.0 License: Suitable for open-source projects.
- Enterprise License: Ideal for commercial use cases, providing more flexibility without the constraints of open-source licensing.
Community and Contribution
The project thrives on community support. Contributors can help by fixing bugs, adding features, or enhancing documentation. Guidelines for contribution can be found in the Contributing Guide.
For bug reports or feature requests, users can engage through GitHub Issues or join discussions on Discord.
Conclusion
The Flickr Scraper by Ultralytics is an invaluable tool for researchers and developers working in the field of computer vision, drastically reducing the time and effort needed to compile image datasets for training machine learning models. Its easy setup and community support make it a go-to solution for image data collection.