Location
Badges
Activity
Ratings Progression
Challenge Categories
Challenges Entered
Classify images of snake species from around the world
Latest submissions
See Allgraded | 58257 | ||
failed | 58254 | ||
graded | 58237 |
Participant | Rating |
---|
Participant | Rating |
---|
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 agoI 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!
Can I have an example of a code which is working to make a submission on gitlab?
Over 4 years agoAt 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.
Can I have an example of a code which is working to make a submission on gitlab?
Over 4 years agoHello 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!
Can I have an example of a code which is working to make a submission on gitlab?
Over 4 years agoHello @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.