Commit f4e7e883 authored by ashivani's avatar ashivani

added Readme

parents
# To be filled in later with an consistent contribution guide
- Q : Who writes that ?
\ No newline at end of file
>**🛠 Contribute:** Found a typo? Or any other change in the description that you would like to see? Please consider sending us a pull request in the [public repo of the challenge here](https://gitlab.aicrowd.com/aicrowd/practice-challenges/aicrowd_JIGSAW_challenge).
# 🕵️ Introduction
<img src="https://i.imgur.com/0tDcVLp.png" width=600 height = 300>
Remember the summer vacation nostalgia of sitting down to solve a giant 200 piece puzzle?
At some point, all of us enjoyed and solved puzzles. The panic of a missing piece and the joy of completing puzzles was exciting!
This challenge will try to recreate the retro-puzzle solving with an AI twist!
Given a set of jumbled images, can you sort them in the correct order to solve the puzzle and form the complete picture?
The mission, if you choose to accept, is to classify and sort the many jumbled images in the correct order and submit a final solution with the correct order number.
</br>Understand with code! Here is [`getting started code`](https://discourse.aicrowd.com/t/baseline-jigsaw/3695) for you.`😄`
# 💾 Dataset
The dataset contains puzzle pieces for an images, inside the folder with name as the image id in `puzzles.tar.gz`. The height and widhth of original image can be found in the `metadata.csv` . There are total `2500` such folders, with puzzle pieces of the respective image ids.
# 📁 Files
Following files are available in the `resources` section:
* `puzzles.tar.gz`: A tar.gz file which when extracted, has 2500 folders (where folder names are the puzzle-id), and each of the folders contain the individual puzzle pieces comprising this puzzle as PNG files.
* `sample_submission.tar.gz`: A tar.gz file with 2500 randomly reconstructed images of each of the puzzles in the test set. The naming convention for each of the files inside this tar is `<puzzle_id>.jpg`.
* `metadata.csv` : A file containing the width and height of each of the puzzles in the test set.
# 🚀 Submission
- Recreate the original images with the puzzle pieces given in each folder for an image.
- Name the image as `{image_id}.jpg`
- Create a `tar.gz` file containing all the recreated images.
- For eg
```
submission.tar.gz
├── 0.jpg
|── 1.jpg
└── ....
```
- `Sample_submission.tar.gz` can be found in resources section.
**Make your first submission [here](https://www.aicrowd.com/challenges/jigsaw/submissions/new) 🚀 !!**
# 🖊 Evaluation Criteria
This challenge uses the [SSIM score](https://en.wikipedia.org/wiki/Structural_similarity) as the primary evaluation metric and the [Mean Squared Error](https://en.wikipedia.org/wiki/Mean_squared_error).
For all the puzzles in the dataset, the individual scores are computed by comparing the submitted reconstructed image in reference to the original image. The overall submission score is the mean SSIM and MSE scores across the whole data
**The score of only 60% of the test data will be revealed during the competition.**
# 🔗 Links
* 💪 Challenge Page: [https://www.aicrowd.com/challenges/jigsaw](https://www.aicrowd.com/challenges/jigsaw)
* 🗣️ Discussion Forum: [https://www.aicrowd.com/challenges/jigsaw/discussion](https://www.aicrowd.com/challenges/jigsaw/discussion)
* 🏆 Leaderboard: [https://www.aicrowd.com/challenges/jigsaw/leaderboards](https://www.aicrowd.com/challenges/jigsaw/leaderboards)
# 📱 Contact
- [Sharada Mohanty](mailto:mohanty@aicrowd.com)
\ No newline at end of file
---
challenge_name: jigsaw
evaluation_repo: git@gitlab.aicrowd.com:aicrowd/practice-challenges/aicrowd_jigsaw_challenge_evaluator.git
data_url: https://datasets.aicrowd.com/default/aicrowd-practice-challenges/public/jigsaw/v0.1/
official_baseline: JIGSAW_baseline.ipynb
authors:
- name: Sharada Mohanty
email: mohanty@aicrowd.com
version: '0.1'
This diff is collapsed.
This diff is collapsed.
import requests
import html
import markdown
import yaml
import os
class Utils():
def __init__(self):
self.base_url = "https://www.aicrowd.com/api/v1/challenges"
self.api_key = os.getenv("AICROWD_API_KEY")
self.headers = {'Authorization': 'Token token="' + self.api_key +'"', 'Content-Type': 'application/json'}
with open("aicrowd.yaml", "r") as f:
self.challenge = yaml.safe_load(f)['challenge_name']
with open("README.md", "r") as f:
self.content = f.read()
self.convert()
def convert(self):
self.content = markdown.markdown(self.content)
self.content = self.content.replace("\"","'")
self.content = self.content.replace("h1","h2")
html.unescape(self.content)
def create_challenge(self):
payload = {
"challenge": self.challenge.upper(),
"status_cd": "draft",
"tagline": "Assemble The Puzzle Pieces",
"perpetual_challenge": False,
"answer_file_s3_key": None,
"slug": "cptcha-identify-the-captcha",
"submission_license": "",
"api_required": False,
"media_on_leaderboard": False,
"online_grading": True,
"description": self.content,
"evaluation": None,
"rules": None,
"prizes": None,
"resources": None,
"submission_instructions": None,
"subissions_page": True,
"license": "",
"dataset_description": None,
"show_leaderboard": True,
"grader_identifier": "AIcrowd_GRADER_POOL",
"online_submissions": True,
"grader_logs": False,
"require_registration": False,
"grading_history": False,
"post_challenge_submissions": True,
"submissions_downloadable": False,
"dataset_note": None,
"discussions_visible": True,
"latest_submission": False,
"other_scores_fieldnames": "",
"teams_allowed": True,
"max_team_participants": 5,
"team_freeze_seconds_before_end": 604800,
"hidden_challenge": False,
"team_freeze_time": None,
"score_title": "",
"score_secondary_title": "",
"primary_sort_order_cd": "",
"secondary_sort_order_cd": "",
"challenges_organizers_attributes": [{"organizer_id": 9, "challenge_id": 1}],
"category_challenges_attributes": [{"category_id": "8"}],
}
return requests.post(self.base_url, json=payload, headers=self.headers)
def update_challenge(self):
payload = {"description": self.content}
request_url = f"{self.base_url}/{self.challenge}"
response = requests.patch(request_url, json=payload, headers=self.headers)
return response
def update_or_create(self):
response = self.update_challenge()
if response.status_code == 404:
response = self.create_challenge()
return response
if __name__ == "__main__":
utils = Utils()
print(utils.update_or_create().text)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment