## 🚀 **About This Challenge**
####**What You Need to Do**
Participants will **train a model** on **synthetic images** and the trained model will then **predict bounding boxes** for real-world test images.  
The model’s performance is evaluated based on **mAP@50** (Mean Average Precision at IoU 0.5) of images in the PRIVATE leaderboard. The public leaderboard gives participants insight into their model's performance, but the private leaderboard will ultimately determine the winners of the competition.  Each leaderboard has an equal number of randomly selected dataset images.

---

## **🛠 How to Get Started** 
2. **[Start generating data](https://falcon.duality.ai/secure/scenarios/edit/0b96f95d-adff-49f5-82a3-9fbffebcb7f1?utm_source=kaggle&utm_medium=kaggle_competition&utm_campaign=competition_5)** using your personally selected variations. 
3. **Train a model** 
   - Local training instructions start on [this page](https://falcon.duality.ai/secure/documentation/ex2-training-installs?sidebarMode=learn&utm_source=kaggle&utm_medium=kaggle_competition&utm_campaign=competition_5)
   - Google Colab cloud training instructions are on [this page](https://falcon.duality.ai/secure/documentation/ex2-colab-training-process?sidebarMode=learn&utm_source=kaggle&utm_medium=kaggle_competition&utm_campaign=competition_5)
6. **Run predictions on test images** 
   - Local installation prediction instructions are on [this page](https://falcon.duality.ai/secure/documentation/ex2-test?sidebarMode=learn&utm_source=kaggle&utm_medium=kaggle_competition&utm_campaign=competition_5)
   - Google Colab cloud prediction instructions are on [this page.](https://falcon.duality.ai/secure/documentation/ex2-colab-test?sidebarMode=learn&utm_source=kaggle&utm_medium=kaggle_competition&utm_campaign=competition_5)
7. **Convert the labels in .txt to a submission.csv** with our `convert_preds_to_csv.py` file and then submit the csv file.
 ```sh
python convert_preds_to_csv.py
```
8. **Confirm the format of your predictions** are correct using the submission format described in the Evaluation Section.
9. Create more data to target model weaknesses, align the synthetic data domain with the real-world domain, and create more effective training data.
10. Check the public leaderboard to see how your model performs in comparison to other competitors, but note that the private leaderboard will be the final rankings!
11. **Join the [Discord Community](https://discord.com/invite/dualityfalconcommunity)** for solving queries related to the competition in the `kaggle-competitions` channels
 
---

## 🔧 **Environment Setup**

### Prerequisites
Ensure you have either of the following installed:
- [Anaconda](https://www.anaconda.com/) 
- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)

### Installation Steps

#### 1. Install Dependencies
Run the provided batch file in ENV_SETUP (get ENV_SETUP in the "Data" tab) to set up the Conda environment:
```sh
setup_env.bat
```
This will:
- Create a new Conda environment named **`EDU`**.
- This will install Python 3.10 and the following packages into a conda environment:
  - `ultralytics`
  - `opencv-python`
  - `PyYAML`
  - `opencv-contrib-python`

#### 2. Activate the Environment. 
```sh
   conda activate EDU
```
**Note**: If your computer has problems with the conda commands try using the anaconda prompt window for step 2.

---

## **Running the Code**
Once the environment is set up, activate the EDU environment using `conda activate EDU` and navigate to the directory containing the scripts:

### 1. **Train the Model**
```sh
python train.py
```
### 2. **Make Predictions on the Test Images**
```sh
python predict.py
```
### 3. **Convert Predictions to a CSV file for Submission**
```sh
python convert_preds_to_csv.py
```

---

## 🎯 **Rules**

📌 **General Rules**
- **Teams**: Maximum **5 members** per team.
- **Pretrained Models**: You may use pretrained models.
- **Submission Limit**: 5 submissions per day.

### Prize Money

 🥇 1st place : $250
 🥈 2nd place: $100
 🥉 3rd place: $50

🚧  **Prize Money Qualifications**
Unfortunately, some countries have restricted money transfer from the US. [Only the countries listed in this document](https://docs.google.com/spreadsheets/d/1gGBsSrGXpkfbpNhUe3CzqFNOHwFYVF0kKeEh3npt6m0/edit?gid=1809021087#gid=1809021087) are able to receive prize money through either Amazon gift cards or Taptap send.

🚨 **Disqualifications**
**Important**: Before awarding prizes, we will conduct a final evaluation of winner's results to ensure the integrity of the competition. We give winners 2 weeks to submit the information for review.
This step helps us verify submissions and maintain a fair and competitive environment. Any signs of rule violations or inconsistencies may result in disqualification.
Violations include but are not limited to:
- Manually modifying test labels.
- Using real world data for training.

Once verified, we will send the money within 3 weeks of the validation end date.

🔗 **Leaderboard**
- **Public Leaderboard**: Uses a **50%** of the test set for real-time rankings.
- **Private Leaderboard**: Final ranking based on other **50%** hidden test labels.

---

## 📣 **Community & Support**
- **Join Our** [Discord](https://discord.com/invite/dualityfalconcommunity) for help & troubleshooting. 
- **Follow us on** [LinkedIn](https://www.linkedin.com/company/dualityai/) for updates 📢

💡 **Think you can build the best synthetic-to-real object detector? Let’s see what you've got!**