Loading
0 Follower
0 Following
ignasimg

Location

ES

Badges

0
0
0

Activity

Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Apr
Mon
Wed
Fri

Ratings Progression

Loading...

Challenge Categories

Loading...

Challenges Entered

Latest submissions

See All
graded 58257
failed 58254
graded 58237
Participant Rating
Participant Rating
ignasimg has not joined any teams yet...

SnakeCLEF2021 - Snake Species Identification Chall

Can I have an example of a code which is working to make a submission on gitlab?

Over 4 years ago

Hello @shivam!
Me as @ValAn I feel this kind of information (resources, time limit, and so on) should be better documented, not just for this challenge but for every challenge you guys host.

Also it seems you are constantly improving your platform, which is something great, but as a user I don’t know when you guys do it, nor what do you update, and when I get some inconsistency with previous experience I become nuts about which point I’m missing.

That being said, I think the timing issue is more related to the time for accessing the images in disk rather than the GPU time, which is kind of… sad.
I’ll definitely write more about that when this round is over. :slight_smile:

Can I have an example of a code which is working to make a submission on gitlab?

Over 4 years ago

I don’t use Keras nor Tensorflow, but if you are using conda - which you totally should (not just because it will make dependency management way easier but also because it’s a piece of software easy to use and which actually works straightforward) - it’s as easy as having your environment activated typing:

$ conda env export > environment.yml

Can I have an example of a code which is working to make a submission on gitlab?

Over 4 years ago

@amapic in the sample submission from starter kit you can find:

AICROWD_TEST_IMAGES_PATH = os.getenv("AICROWD_TEST_IMAGES_PATH", "./data/test_images_small/")
AICROWD_TEST_METADATA_PATH = os.getenv("AICROWD_TEST_METADATA_PATH", "./data/test_metadata_small.csv")
AICROWD_PREDICTIONS_OUTPUT_PATH = os.getenv("AICROWD_PREDICTIONS_OUTPUT_PATH", "random_prediction.csv")

as @ValAn told you, it’s better if you don’t change the defaults. But if you still need to change, make sure to just change the second parameter from the call to os.getenv.

This is because when you submit your code aicrowd expects you to β€œread” those paths from environment variables they’ve set.

For you to test that it works on your local machine it should be enough with the default values and uncompressing both test_metadata_small.tar.gz and test_images_small.tar.gz in the data folder. You can download both of those files in the resources page


As for dealing with corrupt files you can see how @gokuleloop did it for round 2 @ https://github.com/GokulEpiphany/contests-final-code/blob/master/aicrowd-snake-species/inference/run.py#L196
Disclaimer: It’s impossible to use his same idea, due to now we don’t have a sample submission .csv file, but you can get an idea of how to deal with those.

Personally what I do is simply generate a β€œfake” random image, but I guess there are better ways (more efficient / scoring higher) my pseudocode would be like:

try :
    image = read(file)
except :
    image = random

Final tip: Be sure to add a line with a corrupt / non-existent image file to the test_metadata_small.csv mentioned earlier, so you can also be sure your code can handle errors when reading the images.

Best of luck! :slight_smile:

Can I have an example of a code which is working to make a submission on gitlab?

Over 4 years ago

At the end yes.

Only problem which I had and I guess I wouldn’t have been able to solve it blindly debugging if it was not for @ashivani is that a pip package (opencv-python==4.1.2.30) seems to have some problem with aicrowd servers (and not in my machine) and you need to include a file apt.txt with the following contents:
libglib2.0
libsm6
libxext6
libxrender1
libfontconfig1

You can find why you need this file @ https://discourse.aicrowd.com/t/how-to-specify-runtime-environment-for-your-submission/2274

You can find why you need these lines @ https://stackoverflow.com/questions/53359649/from-cv2-import-importerror-libgthread-2-0-so-0-cannot-open-shared-object-f?noredirect=1

another β€œminimal” debugging guideline is in which stage you get your error?

Does your image build successfully? (For me it’s always been like that but if not then probably there’s some shit going on with your environment files - the ones listed on the first link)
Does it fail immediately after evaluation started? If so, it’s likely an issue with your code, or your imports.
Does it FAIL after a while has past since evaluation started? If so, it’s likely you have some problem with reading corrupted images.
Does it ABORT after a while has past since evaluation started? If so, it’s likely it’s taking too long, remember to use GPU.

Again, I don’t have any privileged knowledge of how aicrowd internally works, so it would be nice for an admin to add more information to the subject, but I suspect those are the most usual stones people meet along the path.

Sorry for the late reply, I wasn’t home and I wanted to post a proper reply with all the details, although I don’t know for sure whether those are your problems I hope it can help anyone in the future.

If I can help you with anything else let me know, I believe submitting is truly something that should be made easier. :slight_smile:

Can I have an example of a code which is working to make a submission on gitlab?

Over 4 years ago

Hello Amapic!

I struggled with the same few days ago. Here are some notes:

  • I suggest you turn off debug. Sometimes works, sometimes it doesn’t is just the long version for it doesn’t work, and I suspect the administrators don’t look into the issues which are debug: true.

  • Use conda and check your basic setup, aside from aicrowd api, works fine.

  • Remember the test is offline so you won’t be able to download anything once it started, everything (including your model) should be on the repo, and likely will need to use git-lfs.

  • Remember there are some corrupt files in the testing dataset, just like in the training one. BUT you still have to throw predictions for those.

  • If your solution needs gpu (likely) remember to set gpu: true on aicrowd.json

You can use the basic submission structure from the starter kit @ https://github.com/AIcrowd/snake-species-identification-challenge-starter-kit
You can also check the submission from @gokuleloop for round 2 @ https://github.com/GokulEpiphany/contests-final-code/tree/master/aicrowd-snake-species/inference

Best of luck! :smile:

ignasimg has not provided any information yet.