Skip to content
Snippets Groups Projects
Commit 40175f59 authored by Shivam Khandelwal's avatar Shivam Khandelwal
Browse files

Rebased public facing starter kit with internal version

parent a6687ca2
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ You can add your SSH Keys to your GitLab account by going to your profile settin
3. **Install** competition specific dependencies!
```
cd airborne_detection_starter_kit
cd airborne-detection-starter-kit
pip3 install -r requirements.txt
```
......@@ -137,9 +137,8 @@ You need to make sure that your model can predict airborne objects for each flig
## Local evaluation
You can also test end to end evaluation on your own systems. This step will provide you random scores.
You can also test end to end evaluation on your own systems. The scripts are available in `core/metrics` folder.
TBA
# 📎 Important links
......
metrics @ 3a3dc7eb
Subproject commit 3a3dc7eb623027d0081fadb7e43eeca3ddd9be8d
......@@ -122,8 +122,8 @@ This library will provide you quick access and download only the files you requi
```python
from core.dataset import Dataset
dataset = Dataset(local_path='data/part1', s3_path='s3://airborne-obj-detection-challenge-training/part1/')
dataset.add(local_path='data/part1', s3_path='s3://airborne-obj-detection-challenge-training/part1/')
dataset.add(local_path='data/part1', s3_path='s3://airborne-obj-detection-challenge-training/part1/')
dataset.add(local_path='data/part2', s3_path='s3://airborne-obj-detection-challenge-training/part2/')
dataset.add(local_path='data/part3', s3_path='s3://airborne-obj-detection-challenge-training/part3/')
```
NOTE: You don't need to have `groundtruth.json` pre-downloaded, it will automatically download, save and load them for you.
......
......@@ -7,4 +7,6 @@ boto3
opencv-python<4.3
bounding-box
numpy
Pillow
\ No newline at end of file
Pillow
imgaug
core/metrics
......@@ -30,27 +30,26 @@ class RandomPredictor(AirbornePredictor):
NOTE: In case you want to load your model, please do so in `predict_setup` function.
"""
def inference(self, flight_id):
# In this random example, we are making use of dataset exploration i.e. objects are generally located somewhere near
# center range, and similarly for typical range of frames they are visible, etc...
class_name = random.choice(["Airplane1", "Helicopter1"])
track_id = random.randint(0, 3)
bbox = [random.uniform(1300, 1500), random.uniform(1000, 1200), random.uniform(50, 100), random.uniform(50, 100)]
initial_empty_frames = random.randint(500, 900)
frame_with_airborne_object = random.randint(100, 200)
i = random.randint(500, 900)
j = random.randint(100, 200)
for frame_image in self.get_all_frame_images(flight_id):
# frame_image_path = self.get_frame_image_location(flight_id, frame_image)
# img = Image.open(frame_image_path)
# Do something... (example of loading images for evaluation)
# Do something...
initial_empty_frames -= 1
if initial_empty_frames > 0:
i -= 1
if i > 0:
continue
frame_with_airborne_object -= 1
if frame_with_airborne_object > 0:
confidence = random.uniform(0.5, 1)
j -= 1
if j > 0:
confidence = random.uniform(0.7, 1)
self.register_object_and_location(class_name, track_id, bbox, confidence, frame_image)
......
import os
import os, sys
sys.path.append(os.path.dirname(os.path.realpath(os.getcwd())))
sys.path.append(os.path.realpath(os.getcwd()))
from core.dataset import Dataset
if __name__ == "__main__":
print("Easy to use download script to be added here!")
dataset = Dataset(local_path='data/part1', s3_path='s3://airborne-obj-detection-challenge-training/part1/')
dataset.add(local_path='data/part2', s3_path='s3://airborne-obj-detection-challenge-training/part2/')
dataset.add(local_path='data/part3', s3_path='s3://airborne-obj-detection-challenge-training/part3/')
i = 1
all_flights = dataset.get_flight_ids()
for flight_id in all_flights:
print("Downloading Flight#%s (%s/%s)..." % (flight_id, i, len(all_flights)))
dataset.get_flight_by_id(flight_id).download()
i += 1
print("Download complete.")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment