Skip to content

ultralytics/xview-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Ultralytics logo

Introduction ๐Ÿ‘‹

Welcome to the Ultralytics software directory! This codebase is open-source and distributed under the AGPL-3.0 license. Discover more about Ultralytics and our innovative projects by visiting our official website at https://www.ultralytics.com.

Ultralytics Actions Ultralytics Discord Ultralytics Forums Ultralytics Reddit

Project Overview ๐Ÿ“„

This repository, hosted at https://github.com/ultralytics/xview-docker, provides the necessary tools to dockerize and deploy machine learning models specifically for the xView detection challenge ๐Ÿ”. It is intended to be used alongside the trained models available in our xView YOLOv3 repository.

Prerequisites ๐Ÿ”–

Before you begin, ensure you have Docker and Python 3.6 or newer installed. You'll also need several Python packages. Install them using pip:

pip3 install -U -r requirements.txt

Make sure you have the following essential packages installed:

  • numpy: For efficient numerical operations.
  • scipy: Used for various scientific and technical computations.
  • torch: The core deep learning framework (PyTorch).
  • opencv-python: A library for computer vision tasks.

Dockerization Steps ๐Ÿณ

Follow these steps to containerize this repository using the provided run.sh script for the xView challenge.

Step 1: Copy Best Model Checkpoint

Retrieve the best performing model checkpoint from the training process conducted in our xView YOLOv3 repository and place it in the designated checkpoints directory:

mkdir xview-docker/checkpoints
cp xview-yolov3/checkpoints/best.pt xview-docker/checkpoints

Step 2: Build and Tag The Docker Container

This sequence of commands removes any old Docker images, grants execution permissions to the run.sh script, builds the new Docker image, and applies a specific tag (e.g., ultralytics/xview:v30):

sudo docker image prune -a
cd xview-docker && chmod +x run.sh
sudo docker build -t friendlyhello .
sudo docker tag friendlyhello ultralytics/xview:v30

Step 3: Run Container on Example Image

Test the newly built container using an example image. This command runs the container, specifying CPU and memory limits via the Docker run command, executes the run.sh script on a sample TIFF image, and displays the output text file:

time sudo docker run -it --memory=8g --cpus=1 ultralytics/xview:v30 bash -c './run.sh /1047.tif /tmp && cat /tmp/1047.tif.txt'

Here's a sample output visualization:

Example Detection

Step 4: Push to Docker Hub

After successful testing, upload your container image to Docker Hub, making it ready for submission to the xView challenge:

sudo docker push ultralytics/xview:v30

Your container can now be found hosted at https://hub.docker.com/r/ultralytics/xview/, prepared for the challenge ๐Ÿš€.

Contribute ๐Ÿค

We warmly welcome contributions from the community! Whether it's fixing bugs, adding new features, or enhancing documentation, your input is highly valuable. Please refer to our Contributing Guide to get started. We're also keen to hear about your experiences with Ultralytics productsโ€”please consider filling out our Survey. A huge ๐Ÿ™ thank you to all our contributors!

Ultralytics open-source contributors

License ยฉ๏ธ

Ultralytics provides two licensing options to accommodate diverse needs:

  • AGPL-3.0 License: Ideal for students and enthusiasts, this OSI-approved open-source license promotes collaboration and knowledge sharing. See the LICENSE file for details.
  • Enterprise License: Designed for commercial applications, this license permits the integration of Ultralytics software and AI models into commercial products without the open-source obligations of AGPL-3.0. For commercial use cases, please contact us via Ultralytics Licensing.

Contact Us ๐Ÿ“ฌ

For bug reports, feature requests, and contributions, please visit GitHub Issues. For broader questions and discussions regarding this project or other Ultralytics initiatives, join our vibrant community on Discord!


Ultralytics GitHub space Ultralytics LinkedIn space Ultralytics Twitter space Ultralytics YouTube space Ultralytics TikTok space Ultralytics BiliBili space Ultralytics Discord