投稿時間:2022-02-18 11:22:28 RSSフィード2022-02-18 11:00 分まとめ(27件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Amazon、Kindleストアで「冬のKindle本ポイントキャンペーン」を開始 − 1万冊以上が最大50%ポイント還元に https://taisy0.com/2022/02/18/152241.html amazon 2022-02-18 01:10:53
TECH Engadget Japanese オーバーイヤーヘッドホンのAmazon売れ筋ランキング。耳をすっぽりカバーして音楽や映画の世界に没入! https://japanese.engadget.com/ranking-headphones-over-ears-015018466.html amazon 2022-02-18 01:50:18
TECH Engadget Japanese Galaxy Z Fold4(仮称)はスタイラス内蔵、画面サイズは現行と変わらないとの噂 https://japanese.engadget.com/galaxy-z-fold-4-013031375.html theelec 2022-02-18 01:30:31
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] ワークマン、火花に強い「キャンプ用ウェア」を発売 テントと“おそろいコーデ”も https://www.itmedia.co.jp/business/articles/2202/18/news063.html flametech 2022-02-18 10:50:00
IT ITmedia 総合記事一覧 [ITmedia News] Google Cloud純正のシステム構成図作成ツールが登場 作図通りのデプロイも可 無料 https://www.itmedia.co.jp/news/articles/2202/18/news079.html cloud 2022-02-18 10:41:00
python Pythonタグが付けられた新着投稿 - Qiita PythonのEnumの比較結果がなぜかFalseになる https://qiita.com/tomokon/items/f4edfa55a578250eef43 上記のbpyではfromenumsimportColorとしているのに対し、testpyではfromenumbugenumsimportColorとしてしまっており、比較しているつのEnumが別のパッケージのものになってしまっていたためにEnumの比較がFalseになってしまっていた。 2022-02-18 10:43:44
js JavaScriptタグが付けられた新着投稿 - Qiita Stripeで作成した「段階的な料金」または「数量ベースの料金」の詳細をAPIで取得する方法 https://qiita.com/hideokamoto/items/f3cf8f6abd022247ecea 終わりにStripeを利用することで、ユーザー数や利用数に応じた段階的・数量ベースの価格設定を行うことができます。 2022-02-18 10:33:59
Linux Ubuntuタグが付けられた新着投稿 - Qiita Ubuntu最新版のインストール https://qiita.com/itty-star/items/ea8cfd017a7a5924c342 MacでUSBにインストールイメージを作成してインストールするには少々コマンドで作業が必要だったのでメモしておきます。 2022-02-18 10:39:31
AWS AWSタグが付けられた新着投稿 - Qiita AWS CodeCommitへのプルリクエストでCodePipelineを起動させてみた https://qiita.com/y-nakama/items/15f6d9001b828e0be00a プルリクエスト時に起動するようにEventBridgeのトリガーを変更するまず、CodePipelineを作った最に自動で作成されたルールを削除してリポジトリへのpushではパイプラインを起動しないようにします。 2022-02-18 10:57:27
技術ブログ Developers.IO 実践!AWS CDK #31 EC2 Stack https://dev.classmethod.jp/articles/cdk-practice-31-ec2-stack/ awscdkecstack 2022-02-18 01:53:47
技術ブログ Developers.IO Serve your customers better with single millisecond latency – AWS Local Zones https://dev.classmethod.jp/articles/aws-local-zones/ Serve your customers better with single millisecond latency AWS Local ZonesYesterday AWS announced expansion of its Local Zones service to new cities which is great In 2022-02-18 01:42:08
海外TECH DEV Community Let's create a face dataset with unsplash data https://dev.to/ramgendeploy/lets-create-a-face-dataset-with-unsplash-data-3me3 Let x s create a face dataset with unsplash dataI want to get more into dataset creation and exploration and when unsplash released a dataset a while back i knew that it was a good excuse to start Then thought seeing other dataset like FFHQ and similar face datasets that it would be interesting to make a pipeline to make a sub dataset of faces from the unsplash dataset Alright so we are going to use the test dataset that unsplash provides but everything works with the full dataset if you are able to access that one you can get more information in the github repo This articles is the summarized version of this video where i go more in depth in each part and we do a walkthrough of why and how we do things hope you can check it out Awesome We are going to use jupyter notebooks and python scripts so let s go First we need the datasetHere if you have the link to the full dataset change the download link to that and also the file output name mkdir dscurl L s output ds unsplash research dataset lite latest zip tar xf ds unsplash research dataset lite latest zip directory ds Here we make the ds folder then download and uncompress the dataset you should have tab separated values files and markdowns we are going to focus on the photos file Loading the imagesNow let s see how to load the images from the url of the dataset and have it ready for processing image bytes requests get print image bytes status code image bytes image bytes contentimage stream BytesIO image bytes img open Image open image stream img openWe use requests to get the image and then with BytesIO we read the stream of bytes then we can use the open method from the PIL library to load that image into the img open variable we can leave the variable in the last line and the notebook will display it Computing the face boxAwesome now let s see how to get the face box and then display it with matplotlib first we need the haarcascade model to get the face box coordinates This will create the models folder and download the file of the classifier mkdir modelscurl L s output models haarcascade frontalface alt tree xmlGreat now let s load the model with CascadeClassfier then we need to get the gray version of the image for the classifier we do this by first getting the numpy array of the PIL imagen and then with cvtColor we get the gray image Then we feed this gray image to the classifier getting a list of face cords that the classifier detects Then we can loop through the box cords and draw rectangles to a copy of our image The cords of the box have this format x y w h image draw np array img open copy detector cv CascadeClassifier models haarcascade frontalface alt tree xml image gray cv cvtColor np array img open cv COLOR RGBGRAY faces detector detectMultiScale image gray for cords in faces cv rectangle image draw cords cords cords cords cords cords plt figure figsize plt imshow image draw We can also get the face landmarks using the lbfmodelcurl L s output models lbfmodel yamlThis models requires the box cords for each face so we loop through each of them and we calculate the face landmarks landmark detector cv face createFacemarkLBF landmark detector loadModel models lbfmodel yaml for cords in faces landmarks landmark detector fit image gray faces for landmark in landmarks for i x y in enumerate landmark cv circle image draw int x int y image draw cv putText image draw f i int x int y cv FONT HERSHEY SIMPLEX cv LINE AA plt figure figsize plt imshow image draw Crop the face and recalculate the facebox to the full sizeSo as you can see we compute the face box cords with a rescale of the original image let s see how to get the box for the original image First let s see a function that given the box face cords the shape of the original image and the shape of the rescale computes the new box So here what we basically have to do is calculate a ratio and then multiply the box for that ratio we loop through all the boxes and we multiply the new x y and the new height and width def recal box box cords old shape new shape recal boxes for box in box cords Ry Rx new shape old shape new shape old shape x y w h box new y new x int Ry y int Rx x new h new w int Ry h int Rx w recal boxes append new x new y new w new h return recal boxesNow let s overview the process of using the function here we load the images to get the shape or rather the height and width of the original image we have the width of the rescale but not the height so we also get that Then we calculate the ration that we need and we give that to function recal box test recal image bytes s requests get test recal image bytes s image bytes s contentimage stream s BytesIO image bytes s img open s np array Image open image stream s image bytes requests get test recal split image bytes image bytes contentimage stream BytesIO image bytes img open np array Image open image stream og shape img open s shapenew shape img open shapenew box recal box og shape new shape And we have our result We can do this for all the images that we encountered in the dataset and have the face box for the original image Downloading images Alright last thing is downloading all the faces Let s say that we computed all the images and we have a csv with the link of the original image and the face boxes for that image import numpy as npimport pandas as pdimport osfrom io import BytesIOimport requestsfrom PIL import Imageimport cvimport numpy as npfrom pathlib import Pathimport argparsedef cropface image box fill ratios h img w img image shape Ry Rx ratios x y w h box new y new x Ry y Rx x y fill max new y h fill x fill max new x w fill new h new w Ry h y Rx w x h fill min h img new h h fill w fill min w img new w w fill return image int y fill int h fill int x fill int w fill def get opt parser argparse ArgumentParser parser add argument source type str required True parser add argument output type str default unsplash faces opt parser parse args return optif name main opt dict get opt Path opt output mkdir exist ok True parents True print Loading photos df photos df pd read csv opt source sep header print Finish photos df for j r in photos df iterrows cur cords eval r face box cords cur img r photo image url image bytes requests get cur img split image bytes image bytes content image stream BytesIO image bytes img open np array Image open image stream name cur img split for i cords in enumerate cur cords cur crop cropface img open cords fill ratios try cv imwrite os path join opt output f name i jpg cur crop except print f Error with cur img print f j len photos df Now here we first declare the cropface function that given an image and a box crops the image and returns that crop This function can also recalculate the rations and give a fill to the box if we want We slice the image using the face cords and we use max and min to ensure the fill doesn t go over the edges we don t want a out of index error DWe use argparse for the options of the script then we iterate over the csv of our data and we do the same process as before but here we only need to crop the face and save it Wonderful that s it Hope you like it follow me and also check my YT creds Photo by Gift Habeshaw Original Photo by freestocks 2022-02-18 01:55:48
海外TECH DEV Community TypeScript and the Error: Cannot Redeclare Block Scoped Variable <Name> https://dev.to/luizcalaca/typescript-and-the-error-cannot-redeclare-block-scoped-variable-289j TypeScript and the Error Cannot Redeclare Block Scoped Variable lt Name gt Hi Devs Who are getting start in Typescript could face this error Cannot Redeclare Block Scoped Variable Name and it means a concept into that language Let s see an example The error is coming because we have a TypeScript feature The file needs to be declared as a module exports with its own scope The script into file will be comprehended in a global scope The first example is the option So how can we solve that Let s see another example with the export Therefore when we use the export it s created a module with its own scope and not shared in global scope ContactsEmail luizcalaca gmail comInstagram Linkedin Twitter 2022-02-18 01:09:54
Apple AppleInsider - Frontpage News OtterBox identifies defective OtterSpot units, launches replacement program https://appleinsider.com/articles/22/02/18/otterbox-identifies-defective-otterspot-units-launches-replacement-program?utm_medium=rss OtterBox identifies defective OtterSpot units launches replacement programOtterbox has launched a voluntary replacement program for their OtterSpot stackable wireless charging packs after discovering a flaw that could lead some early units to swell under certain circumstances First released in August the OtterSpot stackable wireless charging battery pack is designed to be able to charge a Qi compatible device without being plugged into a wall outlet due to an integrated battery cell embedded inside the charger The OtterSpot and Qi compatible devices can be charged while plugged into the wall Additional OtterSpot units can also be stacked atop each other to charge Read more 2022-02-18 01:28:31
金融 ニッセイ基礎研究所 米住宅着工・許可件数(22年1月)-着工件数、許可件数でマチマチの結果 https://www.nli-research.co.jp/topics_detail1/id=70294?site=nli 住宅着工件数の伸びは前月比前月とヵ月ぶりにマイナスに転じた図表。 2022-02-18 10:27:51
海外ニュース Japan Times latest articles Putin makes inroads in pressure campaign against West and Ukraine https://www.japantimes.co.jp/news/2022/02/18/world/putin-crisis-inroads/ Putin makes inroads in pressure campaign against West and UkraineFor Putin the procession of foreign dignitaries flying in for talks including France s president Germany s chancellor and two British ministers is already a win pushing 2022-02-18 10:42:53
海外ニュース Japan Times latest articles Hospitals under siege show Hong Kong squandered COVID edge https://www.japantimes.co.jp/news/2022/02/18/asia-pacific/hong-kong-hospitals-covid19/ periods 2022-02-18 10:27:37
ニュース BBC News - Home Covid: NHS bosses call for free tests and isolation to remain https://www.bbc.co.uk/news/health-60421538?at_medium=RSS&at_campaign=KARANGA english 2022-02-18 01:31:49
ニュース BBC News - Home 'My child is in pain - but I'm helpless' https://www.bbc.co.uk/news/health-60417283?at_medium=RSS&at_campaign=KARANGA forgotten 2022-02-18 01:21:22
ニュース BBC News - Home Afghan refugees worried over UK visas, lawyers warn https://www.bbc.co.uk/news/uk-60425301?at_medium=RSS&at_campaign=KARANGA office 2022-02-18 01:39:18
ビジネス ダイヤモンド・オンライン - 新着記事 高級ブランド軒並み値上げ、富裕層の抵抗少なく - WSJ発 https://diamond.jp/articles/-/296810 高級 2022-02-18 10:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 失敗から学ぶバイデン氏、対ロでは同盟国味方に - WSJ発 https://diamond.jp/articles/-/296812 対ロ 2022-02-18 10:10:00
北海道 北海道新聞 前田がゴール、チームは敗れる 欧州カンファレンスL https://www.hokkaido-np.co.jp/article/647144/ 英国 2022-02-18 10:02:16
北海道 北海道新聞 道内公立高推薦3382人内定 合格率85・2% 22年度入試 https://www.hokkaido-np.co.jp/article/647167/ 選抜 2022-02-18 10:15:29
北海道 北海道新聞 【道スポ】コンサ・宮沢7年連続主将に決定 開幕線へワクワク https://www.hokkaido-np.co.jp/article/647170/ 北海道コンサドーレ札幌 2022-02-18 10:07:00
北海道 北海道新聞 イチローさん、入念に体づくり 米マリナーズ球団施設で https://www.hokkaido-np.co.jp/article/647169/ 体づくり 2022-02-18 10:06:00
マーケティング AdverTimes 夏木マリ流 SDGsの伝え方とは? https://www.advertimes.com/20220218/article377173/ 今回インタビューしたのは、年から途上国支援を行っている夏木マリさん。 2022-02-18 01:43:56

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)